Conversation
…ctoring (#312) * feat: add polish foundation support in sdk * fix: export typed rpc error models * test(auth): cover delete wallet general error mapping * test(auth): cover generalized wallet rpc errors * fix: harden KDF error parsing against malformed responses - Wrap KdfErrorRegistry.tryParse parser invocation in try/catch to gracefully fall back to GeneralErrorResponse on malformed error_data - Make _intFromJson and _doubleFromJson null-safe (return 0 instead of throwing ArgumentError) - Make Mm2Duration.fromJson handle null input (return Duration.zero) - Apply same fixes to the generator script so regenerated code stays consistent - Refine doc comments on delete_wallet and change_mnemonic_password * fix: harden stream controller lifecycle and refactor fee guard - Add isCancelled flag with canEmit/tearDownResources helpers to orderbook and swap-status stream controllers to prevent race conditions where events could be emitted after cancellation - Extract _throwIfFeeEstimationDisabled helper in FeeManager to remove duplicated guard logic across ETH, UTXO and Tendermint paths - Update bundled coins repo commit hash
* feat(sdk): add high-level balance and tx manager interfaces * fix(sdk): address pr review cancellation and ordering bugs
* feat(sdk): add TRON and TRC20 support * chore(sdk): remove generated whitespace * fix(sdk): align config parsing and KDF compatibility
* refactor(withdrawals): enforce preview-then-execute workflow to prevent duplicate signing - Add executeWithdrawal() method to broadcast pre-signed transactions - Deprecate withdraw() method in favor of two-step preview-execute flow - Update example app to use new executeWithdrawal() method - Prevents transactions from being signed multiple times - Ensures users always review transaction details before broadcast Breaking Changes: - withdraw() is now deprecated (still functional but not recommended) - Recommended flow: previewWithdrawal() → executeWithdrawal() * Update packages/komodo_defi_sdk/lib/src/withdrawals/withdrawal_manager.dart Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * use latest KDF commit in `sia-rc-cleanup` * migrate SIA updates from old branch * fix wallet build errors * fix sia activation param * chore: update generated code chore: update generated code by running `melos run prepare` (requires Dart `melos` tool to be installed) * fix: fix broken sia RPC method test fix broken sia RPC method test. NB! Only fixing static analysis errors - the functionality of the test itself remains unchanged * clean task loop exit * implement SIA withdrawals * exclude SIA coins from pk export * fix(sia): explicitly remove support for tx streaming for sia * test(sia): add test case to confirm that tx history streaming is not supported for sia * chore(deps): bump kdf to 85d354d * update kdf commit * updates kdf commit --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: smk762 <smk@komodoplatform.com> Co-authored-by: Francois <takenagain@users.noreply.github.com>
The squash merge of the SIA branch into dev left a duplicate executeWithdrawal method in LegacyWithdrawalManager. Remove the second copy which also inconsistently used WithdrawalException directly instead of the _mapError helper.
Add a dedicated metadata mutex to serialise read-modify-write cycles on user metadata, preventing concurrent coin activations from overwriting each other's state. Introduces updateActiveUserMetadataKey for atomic single-key transforms and migrates setOrRemoveActiveUserKeyValue to use it. Also updates bundled coins config to master branch (aceacfb).
…builds (#329) Replace T.toString() parsing for List/Map handling with compile-time type checks so dart2js and dart2wasm (including minification) behave correctly. Add unit tests for value/valueOrNull list and map paths.
Update bundled_coins_repo_commit to 32a0cdc2e9ab5927a571cb1c85fc4be080567e70.
The streaming manager previously fell through to enable_* calls after a short 2-second timeout even when no first byte had been received from the SSE / SharedWorker connection. KDF responds with UnknownClient when the client is not yet registered, causing all three retry attempts to fail and leaving orderbook (and other) streams permanently broken for the session. Changes: - Increase the first-byte wait to 30s per attempt (3 attempts with reconnect between each) so we never call enable_* before KDF has actually registered the SSE client. - Abort with an exception instead of proceeding without readiness; the fallback RPC + polling path in OrderbookBloc handles this gracefully. - On UnknownClient retries, re-run the full first-byte readiness gate instead of a fixed 3s sleep. - Always reset the first-byte Completer on disconnect(), even if it was never completed, so subsequent sessions don't block on a stale future.
- dragon_charts_flutter@0.1.1-dev.4 - dragon_logs@2.0.1 - komodo_cex_market_data@0.1.0 - komodo_coin_updates@2.0.0 - komodo_coins@0.3.2 - komodo_defi_framework@0.4.0 - komodo_defi_local_auth@0.4.0 - komodo_defi_rpc_methods@0.4.0 - komodo_defi_sdk@0.5.0 - komodo_defi_types@0.4.0 - komodo_ui@0.3.1 - komodo_wallet_build_transformer@0.4.1 - komodo_wallet_cli@0.5.0
…on (#335) Add a secondary cache for current (non-historical) prices so priceIfKnown does not return null during periodic live-cache clears. Document streaming tech debt and cover behaviour with unit tests.
* fix(komodo_defi_types): support TRON explorer URLs * chore(sdk): commit pending SDK updates
* feat(komodo_defi_sdk): add Tronscan transaction history strategy Implement TronscanTransactionStrategy for fetching transaction history from the Tronscan HTTP API for TRX native and TRC-20 token assets. - Support mainnet (apilist.tronscanapi.com) and Nile testnet endpoints - Fetch TRX transfers via /api/transfer, TRC-20 via /api/token_trc20/transfers - Two-layer pagination: server-side batching with client-side aggregation - Retry on 429/503 with Retry-After header and exponential backoff with jitter - Optional TRON-PRO-API-KEY header for improved rate limits - Merge duplicate TransactionInfo across multiple pubkey addresses - Wire through TransactionHistoryStrategyFactory, Manager, and bootstrap - Add KomodoDefiSdkConfig.tronProApiKey configuration field - Update tests for TRX/TRC-20 asset selection, ordering, and retry behavior * feat(transaction-history): migrate TRON history to TRONGrid
Prevent CoinGecko support checks from poisoning repository selection and add TRX fallback IDs so price history can resolve. Deduplicate shared asset activation so already-active assets stop failing into polling fallbacks.
- Add recovery watchers in BalanceManager when activation fails at startup so callers do not need to re-subscribe after races - Refactor balance polling into reusable fetchLatestBalance helper - Improve FeeInfo types and freezed codegen in komodo_defi_types - Add fee_info_display widget in komodo_ui - Update build_config, dev_builds_artefact_downloader, and update_api_config CLI - Add balance_manager_recovery_test and fee_info_test
#342) NotSufficientBalance is shared across RPC namespaces; KdfErrorRegistry previously returned null for all ambiguous types, causing withdraw status errors to fall back to GenericErrorResponse. - Thread rpcMethodHint from ApiClient.post and BaseRequest.parseResponse - Extend GeneralErrorResponse.toTypedException with optional hint - When hint matches withdraw task methods, parse withdraw-specific balance errors
- enforce single-terminal SIA activation progress semantics\n- add first-terminal-wins guard in activation manager\n- validate and reject SIA withdraw source selection (from)\n- route SIA preview/execute/one-shot withdraw through legacy flow\n- remove SIA-specific withdraw RPC surface and tests; use generic withdraw parsing\n- add SIA activation, withdrawal, and tx-history strategy coverage BREAKING CHANGE: removed withdrawSia(), SiaWithdrawRequest, and SiaWithdrawResponse. Migrate to generic withdraw()/WithdrawStatusResponse + WithdrawResult.
* fix(ui): avoid duplicate icon precache requests * fix(ui): retry CDN icon loads after transient failures * fix(ui): harden icon precache fallback and manifest caching
…ache (#346) * fix(ui): avoid duplicate icon precache requests * fix(ui): retry CDN icon loads after transient failures * fix(ui): harden icon precache fallback and manifest caching * fix(market-data): add failure cooldown to CoinGecko coin list fetching When getCoinList() failed, _cachedCoinList stayed null and every subsequent price request re-triggered the API call via supports(), creating a request storm that exhausted rate limits. Add a 5-minute cooldown after failures to prevent retry spam, matching the existing RepositoryFallbackMixin backoff duration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Bump api_commit_hash to d56a7bc5028f10b9c1bb8370bb2ee16444796a23 (branch: main) - Update all platform checksums from v3.0.0-beta release - Add libkdf-macos-universal2-* pattern to macOS matching_pattern - Switch coins_repo_branch from feat/add-tron-coins to master
- persist recurring ZHTLC sync policy while keeping one-shot sync overrides transient during activation - harden KDF start/stop readiness checks and auth retries to recover from stale RPC sockets during wallet flows
…mpat dargon2_flutter's web plugin uses JS interop APIs incompatible with Flutter WASM builds. Replaced with pointycastle's pure-Dart Argon2 implementation which works on all platforms. Removes 7 transitive dargon2 packages from the dependency tree.
Catch transient transport errors (SocketException, HttpException, HandshakeException) during the version probe in _waitUntilKdfRpcReady so the polling loop continues instead of aborting the auth flow when kdfMainStatus reports rpcIsUp before the listener is fully reachable. Add isSupportedPlatform guard to readWalletSecrets, consistent with listLegacyWallets and deleteLegacyWalletData, so unsupported runtimes get the dedicated unsupportedPlatform exception instead of a generic storageAccessError.
BREAKING CHANGE: SIA activation and withdrawals use hardened SIA-specific SDK and RPC paths. Includes stable package bumps, release changelogs, legacy wallet migration notes, and KDF/coins release config.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 798b538752
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (tx.internalId == latestStoredId) { | ||
| reachedStoredHead = true; | ||
| break; | ||
| } | ||
| newTransactions.add(tx); |
There was a problem hiding this comment.
Deduplicate opaque-cursor pages before appending new txs
When usesOpaquePaginationCursor is enabled, this loop appends every fetched transaction until latestStoredId is seen, but it never deduplicates by internalId. With the new TRON strategy, multi-address pagination can intentionally return the same tx on consecutive calls (first address now, pending address next), so self-transfers or cross-owned-address transfers can be appended twice and then emitted twice by _pollNewTransactions (it forwards newTransactions directly). This causes duplicate real-time history events even though storage later collapses duplicates.
Useful? React with 👍 / 👎.
# Conflicts: # CHANGELOG.md # packages/komodo_cex_market_data/CHANGELOG.md # packages/komodo_cex_market_data/pubspec.yaml # packages/komodo_coin_updates/CHANGELOG.md # packages/komodo_coin_updates/pubspec.yaml # packages/komodo_coins/CHANGELOG.md # packages/komodo_coins/pubspec.yaml # packages/komodo_defi_framework/CHANGELOG.md # packages/komodo_defi_framework/app_build/build_config.json # packages/komodo_defi_framework/pubspec.yaml # packages/komodo_defi_local_auth/CHANGELOG.md # packages/komodo_defi_local_auth/lib/src/auth/auth_service.dart # packages/komodo_defi_local_auth/pubspec.yaml # packages/komodo_defi_rpc_methods/CHANGELOG.md # packages/komodo_defi_rpc_methods/pubspec.yaml # packages/komodo_defi_sdk/CHANGELOG.md # packages/komodo_defi_sdk/lib/src/errors/sdk_error_mapper.dart # packages/komodo_defi_sdk/pubspec.yaml # packages/komodo_defi_types/CHANGELOG.md # packages/komodo_defi_types/pubspec.yaml # packages/komodo_ui/CHANGELOG.md # packages/komodo_ui/pubspec.yaml # packages/komodo_wallet_build_transformer/CHANGELOG.md # packages/komodo_wallet_build_transformer/pubspec.yaml # packages/komodo_wallet_cli/CHANGELOG.md # packages/komodo_wallet_cli/pubspec.yaml
|
Visit the preview URL for this PR (updated for commit 6dc43a3): https://komodo-playground--pr350-dev-5gqq8486.web.app (expires Mon, 11 May 2026 07:07:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2bfedd77fdea45b25ba7c784416e81f177aa5c47 |
Summary
devintomain.Notes
devis 39 commits ahead ofmainand 35 commits behind it.devbranch; no local commits were created.Validation