Skip to content

feat(wallet): Tron KDF fix, balance confirmation, withdraw flow hardening & UI redesign#3465

Merged
CharlVS merged 13 commits intodevfrom
feat/wallet-balance-confirmation-withdraw-flow
Mar 27, 2026
Merged

feat(wallet): Tron KDF fix, balance confirmation, withdraw flow hardening & UI redesign#3465
CharlVS merged 13 commits intodevfrom
feat/wallet-balance-confirmation-withdraw-flow

Conversation

@CharlVS
Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS commented Mar 27, 2026

Summary

  • Balance confirmation controller — coin details now gate numeric balance display behind a bootstrap getBalance check or a qualifying stream update, preventing stale cached values from showing.
  • Withdraw form BLoC hardening — preview expiration timer, auto-refresh logic, fee-price warning (isFeePriceExpensive), improved error handling during confirm step, and new events/state fields for the richer UX.
  • Withdraw preview & success UI redesign — card-based layout with dedicated summary, destination, and TRON network-details sections; responsive status banners (expiring countdown, refreshing spinner, error); mobile-friendly action buttons; new WithdrawSuccessReceipt replacing the reused TransactionDetails widget.
  • USD conversion & coins state — safer fiat conversion in coins_repo/coins_state to avoid null/stale values.
  • Coin details test expansion (new) — comprehensive unit/BLoC + widget + integration coverage rollout for coin details, including withdraw edge cases, transaction details behavior, rewards paths, and faucet/address interactions.

Test Coverage Added (new)

  • Added shared coin-details harness utilities for deterministic fixtures.
  • Extended withdraw_form_bloc_test.dart with stale-preview, refresh-recovery, max-amount recompute, duplicate-submit, and SDK error mapping cases.
  • Added transaction details logic/widget tests for confirmations, block labels, fee/memo visibility, explorer and close actions.
  • Added rewards logic/widget tests for claim paths and loading/empty/content rendering.
  • Added faucet/address widget tests for request dispatch and pending-state disablement.
  • Added coin-details integration scenarios:
    • test_coin_details_core.dart
    • test_coin_details_rewards.dart
  • Wired coin-details suites into test_units/main.dart aggregate execution path.

Changed files

  • Existing feature changes + test rollout updates in:
    • lib/views/wallet/coin_details/transactions/transaction_details.dart
    • test_units/main.dart
    • test_units/tests/wallet/coin_details/*
    • test_integration/tests/wallets_tests/test_withdraw.dart
    • test_integration/tests/wallets_tests/test_coin_details_core.dart
    • test_integration/tests/wallets_tests/test_coin_details_rewards.dart

Testing

  • dart format on all changed Dart files.
  • flutter analyze on touched paths (no issues).
  • flutter test test_units/tests/wallet/coin_details (passes).
  • Focused new test files (pass).
  • Integration tests for newly added files are currently blocked in this environment by plugin bootstrap (MissingPluginException for shared_preferences), so they are included but not green locally under this runner.

- Add CoinDetailsBalanceConfirmationController to confirm balance before showing amounts

- Extend withdraw form BLoC/state/events and coin details UI integration

- Improve coins repo/state USD conversion; update rewards and transaction views

- Add unit tests for balance confirmation and coins USD conversion
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1377801565

ℹ️ 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".

Comment thread lib/bloc/withdraw_form/withdraw_form_bloc.dart Outdated
Comment thread lib/views/wallet/coin_details/coin_details_info/coin_details_info.dart Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Visit the preview URL for this PR (updated for commit eee9e36):

https://walletrc--pull-3465-merge-kr4iz565.web.app

(expires Fri, 03 Apr 2026 16:42:18 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb63faa0d8

ℹ️ 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".

Comment thread lib/bloc/withdraw_form/withdraw_form_bloc.dart Outdated
Refactor the withdraw confirmation screen into card-based sections
(summary, destination, TRON details) with responsive layouts, status
banners for expiration/refresh state, and a dedicated success receipt
replacing the reused TransactionDetails widget.
@CharlVS CharlVS changed the title feat(wallet): balance confirmation and withdraw flow updates feat(wallet): balance confirmation, withdraw flow hardening & UI redesign Mar 27, 2026
CharlVS added 4 commits March 27, 2026 14:36
…widget

Use the live bloc state instead of the stale requestState snapshot when
emitting the Trezor confirmation flag in _generatePreview, preventing
isSending/isPreviewRefreshing from being reset mid-request.

Add didUpdateWidget to _BalanceState so the confirmation controller and
balance stream are torn down and re-bound when the parent supplies a
different coin without remounting the widget.
Move isAwaitingTrezorConfirmation into the callers' own "in progress"
emits (from requestState.copyWith) instead of emitting from the live
bloc state getter inside _generatePreview. This keeps all emissions
consistent with the explicit requestState snapshot pattern and makes
_generatePreview a pure function with no side effects.
Add transactions and addresses chips to the coin details header so users can jump directly to those sections without scanning the full page.
Keep section scroll keys in the coin details state and pass semantic callbacks to child widgets so the shortcut chips depend on actions rather than scroll implementation details.
@CharlVS CharlVS changed the title feat(wallet): balance confirmation, withdraw flow hardening & UI redesign feat(wallet): Tron KDF fix, balance confirmation, withdraw flow hardening & UI redesign Mar 27, 2026
@CharlVS CharlVS self-assigned this Mar 27, 2026
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Mar 27, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcc0ebfd19

ℹ️ 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".

Comment thread lib/bloc/withdraw_form/withdraw_form_bloc.dart Outdated
Preserve unrelated async updates while discarding preview results and errors once the effective withdraw request changes.
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Mar 27, 2026

@codex review

@GLEECBTC GLEECBTC deleted a comment from chatgpt-codex-connector bot Mar 27, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52bd3a183d

ℹ️ 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".

Add comprehensive coin-details unit/BLoC and widget coverage, plus integration scenarios and aggregate test wiring, so regressions in withdraw, transaction details, rewards, and faucet/address flows are caught earlier.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 259517e868

ℹ️ 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".

Comment thread lib/bloc/withdraw_form/withdraw_form_bloc.dart
CharlVS added 3 commits March 27, 2026 16:55
Schedule bounded startup retries when bootstrap fetch fails so coin-details balance confirmation does not remain stuck unconfirmed when the stream is quiet.
Includes merged PR #342: RPC method hint for ambiguous KDF error parsing.
…splay

Add formatKdfUserFacingError and extractKdfTechnicalDetails (MmRpc,
GeneralErrorResponse, SdkError, activation wrappers). Use across withdraw,
coin addresses, transaction history, bridge/taker fee and preimage paths,
profit/loss and portfolio growth failures, and ARRR activation emit errors.
Drop redundant English prefixes where the underlying error is already
specific. Update withdraw_form_bloc tests.
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Mar 27, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@CharlVS CharlVS merged commit 81a464e into dev Mar 27, 2026
5 of 12 checks passed
@CharlVS CharlVS deleted the feat/wallet-balance-confirmation-withdraw-flow branch March 27, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant