fix(app): finalize SIA integration and Trezor guards#3449
Conversation
Point the app's SIA integration branch at the current sdk/test-sia tip so the submodule references a GitHub-visible commit and the dev PR can be reviewed alongside the SDK PR.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1dcd7db4e
ℹ️ 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".
| assets = assets | ||
| .where((asset) => asset.id.subClass != CoinSubClass.sia) | ||
| .toList(); | ||
| if (assets.isEmpty) { | ||
| return; |
There was a problem hiding this comment.
Return an error for unsupported Trezor SIA activation
When the requested set is only SIA assets on a Trezor, activateAssetsSync() now filters them out and returns successfully. Callers such as activateCoinIfNeeded() in lib/views/dex/dex_helpers.dart:226-255 only surface a guardrail from the catch path, and that helper is reused by maker/taker/bridge/NFT entry points, so those flows will still let a Trezor user pick SIA and continue with an inactive coin instead of showing the intended unsupported-asset message.
Useful? React with 👍 / 👎.
| final visibleSelectedCoins = await _filterUnsupportedHardwareCoins( | ||
| selectedCoins, | ||
| event.action, | ||
| ); |
There was a problem hiding this comment.
Keep active Trezor SIA coins visible in add-assets
This second filter removes wallet-owned SIA coins from selectedCoins immediately after _mergeWalletCoinsIfNeeded() re-added them. In this app, add-assets is the only reachable coin-management UI I could find (main_layout.dart:178-183, wallet_manage_section.dart:117-121, while CoinsManagerSwitchButton is unused), so any Trezor wallet that already has SIA in metadata from earlier dev builds will have those assets disappear from the list and lose its only in-app way to deselect/deactivate them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb56887a4d
ℹ️ 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".
| assets = assets | ||
| .where((asset) => asset.id.subClass != CoinSubClass.sia) | ||
| .toList(); | ||
| if (assets.isEmpty) { | ||
| return; |
There was a problem hiding this comment.
Emit a state change when Trezor SIA activation is skipped
If a Trezor wallet already has SIA in activated_coins from an older build, CoinsBloc._onLogin() still pre-populates that asset as CoinState.activating and waits for activation updates (lib/bloc/coins_bloc/coins_bloc.dart:381-392 and :597-615). The new early return here drops the request without broadcasting anything back through enabledAssetsChanges, so the SIA entry never gets removed from walletCoins and remains stuck as an "activating" asset for the rest of the session; it can also keep the initial 80% activation threshold from being reached until the one-minute timeout.
Useful? React with 👍 / 👎.
When a Trezor wallet has SIA in its activated coins from an older build, the early return in activateAssetsSync would leave those coins stuck in the "activating" state because no update was ever broadcast via enabledAssetsChanges. Now we broadcast CoinState.suspended for each filtered SIA asset before discarding them, so CoinsBloc correctly removes them from walletCoins.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review comment auditTriaged all 3 Codex review comments. Summary below. C1 (P1) — "Emit a state change when Trezor SIA activation is skipped"Verdict: Valid — fixed in The concern was that if a Trezor wallet had SIA in In practice this is unlikely because the SDK's C2 (P2) — "DEX helpers don't surface SIA unsupported message"Verdict: Out of scope The concern was that
This is a pre-existing concern about general DEX robustness, not introduced by this PR. C3 (P2) — "Keep active Trezor SIA coins visible in add-assets"Verdict: Out of scope The concern was that
This is also a pre-existing concern, not introduced by this PR. |
Resolve submodule conflict by pointing SDK to origin/dev (7a3f409) which now includes the merged SIA support (#320).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Visit the preview URL for this PR (updated for commit 36eaecf): https://walletrc--pull-3449-merge-4f9ktaxw.web.app (expires Wed, 25 Mar 2026 21:00:49 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
Summary
test-siabranch state required by this integrationWhy
devdevDependency
Verification
flutter build webTest plan
dev