Skip to content

feat: coin control to exchange/swap send flow - #1374

Draft
sneurlax wants to merge 7 commits into
stagingfrom
feat/404-coin-control-swaps
Draft

sneurlax wants to merge 7 commits into
stagingfrom
feat/404-coin-control-swaps

Conversation

@sneurlax

Copy link
Copy Markdown
Member

closes #404

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.78261% with 166 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.92%. Comparing base (9ce80be) to head (1fc5e93).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...change_view/sub_widgets/exchange_coin_control.dart 17.47% 85 Missing ⚠️
lib/pages/exchange_view/send_from_view.dart 0.00% 49 Missing ⚠️
...exchange_view/exchange_step_views/step_4_view.dart 0.00% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           staging    #1374    +/-   ##
=========================================
  Coverage    13.92%   13.92%            
=========================================
  Files         1139     1140     +1     
  Lines       114707   114860   +153     
=========================================
+ Hits         15976    15999    +23     
- Misses       98731    98861   +130     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:58
The dialog popped itself on Cancel, but twelve of its thirteen call
sites already popped in their own onCancel handler, so on mobile Cancel
tore down the dialog and the page behind it. Dismissal now belongs to
the caller, and the exchange step 4 send flow gains the pop it had been
relying on the dialog for.
Adds a "Coin control" row to the mobile exchange step 4 send button and
to each wallet card in the send-from view, backed by a shared module:
a visibility predicate, an amount-plus-fee funding estimate computed at
the same rate the send will use, and a validator that re-reads every
stored output from the database before opening the picker and again
before sending.

Outputs that went missing, changed wallet, were frozen, spent or lost
their confirmations clear the selection; a merely underfunded one is
kept so the user can add more. Firo is excluded.
@sneurlax
sneurlax force-pushed the feat/404-coin-control-swaps branch from 4bf149f to 43528a2 Compare August 24, 2026 21:31
@sneurlax

sneurlax commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

TODO: drop 7978202, which duplicates #1364; land #1364 first instead.

Adds a "Coin control" row to the mobile exchange step 4 send button and
to each wallet card in the send-from view, backed by a shared module:
a visibility predicate, an amount-plus-fee funding estimate computed at
the same rate the send will use, and a validator that re-reads every
stored output from the database before opening the picker and again
before sending.

Outputs that went missing, changed wallet, were frozen, spent or lost
their confirmations clear the selection; a merely underfunded one is
kept so the user can add more. Firo is excluded.
The send itself now uses model.payInDecimal, so the coin control
estimate has to as well or the selection can be sized for the wrong
amount. Hide the row when the pay-in amount is unparsable.
Preserve current staging fixes and validate the feature regression suites.

Preserved staging cancellation fixes dd0d2d5 and 6a58f42; removed redundant cancellation changes and merged the coin-control UI/selected-input wiring. Resolved duplicate cancellation variable from overlapping edits.
Preserve current staging fixes and validate the feature regression suites.

Preserved staging cancellation fixes dd0d2d5 and 6a58f42 and cypherstack-only Step4 pay-in amount sizing; retained coin-control UI/selected-input wiring. Resolved duplicate cancellation state from overlapping edits.
@sneurlax

Copy link
Copy Markdown
Member Author

Refreshed against staging d29d84c66049 with a merge that preserves branch history.

Preserved staging cancellation fixes dd0d2d5 and 6a58f42 and cypherstack-only Step4 pay-in amount sizing; retained coin-control UI/selected-input wiring. Resolved duplicate cancellation state from overlapping edits.

Validation: 19 focused tests passed; scoped Dart analysis reports no errors (4 existing warnings retained). git diff --check passes. Pushed the same commit 1fc5e93ae45f to cypherstack and github-cs.

Full app builds and device/platform end-to-end behavior were not exercised.

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.

Coin control in swaps & buy

1 participant