Skip to content

feat(ui): split external Send into address, From, and amount steps#847

Open
romchornyi wants to merge 1 commit into
swift-sdk-integrationfrom
fix/send-split-address-amount-steps
Open

feat(ui): split external Send into address, From, and amount steps#847
romchornyi wants to merge 1 commit into
swift-sdk-integrationfrom
fix/send-split-address-amount-steps

Conversation

@romchornyi

@romchornyi romchornyi commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

The redesigned external Send form (introduced in #819) showed the numeric keypad and amount entry on the address step, and again a second time on the classic amount screen for a plain Core → Core send. The address, source, and amount were not cleanly separated.

What was done?

Split the flow into three screens — address → From → amount:

  1. Address (SendScreen) — address field + destination-type badge + invalid-address / source-mismatch validation, clipboard suggestion, and Scan QR. Continue is gated by the new SendViewModel.canAdvanceToAmount. No keypad, no amount.
  2. From (SendSourceScreen) — source picker only (Transparent / Platform / Shielded), with a read-only address summary and the chain-sync gate note. No amount.
  3. Amount — chosen by the resolved route:
    • Core → Core skips a custom amount screen and continues into the existing classic L1 amount screen (real fee math + its own confirm) via performPay — no double amount entry.
    • Every other leg the L1 screen can't fund — the Core → Shielded asset-lock shield and all Platform/Shielded sources — uses the custom ExternalSendAmountScreen + SendConfirmSheet.

Validations preserved: the chain-sync gate (isBlockedBySync / SyncGateNote) blocks Continue on the From step for Core-funded legs; balance/affordability checks (canContinue) stay on the amount step. Routing under the hood is unchanged. Both hosts push the steps through shared pushExternalSendSource / pushExternalSendAmount extensions, mirroring pushInternalTransfer; the three screens share one SendViewModel.

How Has This Been Tested?

Clean dashpay build (xcodebuild ... -scheme dashpay -sdk iphonesimulator ARCHS=arm64 build). Not yet smoke-tested on testnet across every route — needs a manual pass: Core→Core into the classic amount screen; Core→Shielded / Platform / Shielded into the custom amount screen + confirm; and the balance-row send sheet's Send tab.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f92f9986-470f-4386-af07-539305d35d37

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/send-split-address-amount-steps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@romchornyi romchornyi changed the title feat(payments): split external Send into address → From → amount steps feat(ui): split external Send into address → From → amount steps Jul 17, 2026
The redesigned Send form showed the numeric keypad and amount entry on the
address step. Split it into three screens — address (SendScreen), source
picker (SendSourceScreen), and amount — and choose the amount step by the
resolved route:

- Core → Core continues into the existing classic L1 amount screen (real
  fee math + its own confirm) via performPay, so there is no double amount
  entry.
- Every other leg the L1 screen can't fund — the Core → Shielded asset-lock
  shield and all Platform/Shielded sources — uses the custom amount screen
  (ExternalSendAmountScreen) + SendConfirmSheet.

The chain-sync gate blocks Continue on the From step; balance/affordability
checks stay on the amount step. Both hosts push the steps through shared
pushExternalSendSource / pushExternalSendAmount extensions, mirroring
pushInternalTransfer.
@romchornyi
romchornyi force-pushed the fix/send-split-address-amount-steps branch from ee980be to 48c9827 Compare July 17, 2026 17:22
@romchornyi romchornyi changed the title feat(ui): split external Send into address → From → amount steps feat(ui): split external Send into address, From, and amount steps Jul 17, 2026
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.

2 participants