Skip to content

feat(ui): balance-row send sheet with Send and Internal tabs - #822

Merged
QuantumExplorer merged 5 commits into
swift-sdk-integrationfrom
feat/balance-row-send-sheet
Jul 16, 2026
Merged

QuantumExplorer merged 5 commits into
swift-sdk-integrationfrom
feat/balance-row-send-sheet

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Summary

The balance rows' out (up) arrows now mirror the receive arrows: every row opens a focused two-tab sheet — Send ↔ Internal transfer — pinned to the tapped balance as the source, replacing the three old direct routes (Transparent → send screen, Platform → shield, Shielded → withdraw).

Send tab

  • Embeds the external-send form (from feat(payments): redesigned Send screen with address-type detection and multi-source sends #819) with the From card fixed to the tapped balance (no radio picker).
  • The address field accepts only destination types that balance can pay — Transparent → L1 addresses; Platform → platform or L1; Shielded → transparent, platform, or shielded — with an inline "can't be paid from your X balance" message on mismatch (instead of silently re-picking the source).
  • Core → Core continues through the classic payment processor via the shared BIP21 helper; other routes use the SendConfirmSheet flow.
  • Scanning a QR on the sheet fills the embedded form (address + BIP21 amount).

Internal tab

  • Embeds the transfer form in a new send-pinned layout: fixed From card on top, destination chosen on To radio rows — the exact inverse of the receive sheet's pinned-destination layout.
  • Defaults follow the old direct routes (Core/Platform → Shielded; Shielded → Transparent); all six internal routes remain reachable from their source row.

Plumbing

  • SendViewModel(pinnedSource:) + mismatch reporting; InternalTransferViewModel.applySendRoute(from:) + sendTarget.
  • TransferSourceRow gains a fixed-card (no radio) mode; networkDisplay consolidates the icon/title/balance switches.
  • processPaymentInput: promoted to DWBasePayViewController.h so the landing's QR shadow can fall back to the standard path.
  • Removed now-dead InternalTransferHostingController(direction:source:) and the homeViewShowInternalTransfer delegate leg.

Test plan

  • Clean dashpay simulator build (arm64); installed on QA-iPhone16
  • Each row's up arrow opens the sheet pinned to that balance; tab switch preserves the pin
  • Send tab: valid/invalid destination types per source; Core→Core lands on processor confirm
  • Internal tab: To picker executes the right route per source (testnet smoke)

🤖 Generated with Claude Code

The balance rows' out arrows now mirror the receive arrows: instead of
three different direct routes, every row opens a focused two-tab sheet
(Send ↔ Internal transfer) pinned to the tapped balance as the SOURCE.

- Send tab embeds the external-send form with the From card fixed to
  the tapped balance; the address field accepts only destination types
  that balance can pay (Transparent → L1 addresses; Platform → platform
  or L1; Shielded → all three) and shows an inline mismatch message
  otherwise. Core → Core still rides the classic payment processor via
  the shared BIP21 helper.
- Internal tab embeds the transfer form in a new send-pinned layout:
  fixed From card on top, destination picked on To radio rows (the
  inverse of the receive sheet's applyReceiveRoute) — all six internal
  routes reachable from their source row.
- SendViewModel gains pinnedSource; InternalTransferViewModel gains
  applySendRoute(from:)/sendTarget; TransferSourceRow gains a
  fixed-card (no radio) mode; QR scans on the sheet fill the embedded
  form (processPaymentInput promoted to the base header for the
  standard-path fallback).
- The now-unused InternalTransferHostingController(direction:source:)
  init and the homeViewShowInternalTransfer delegate leg are removed.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 16, 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: 5ecb075f-cc5a-49d0-88a7-e25c3b01b445

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 feat/balance-row-send-sheet

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.

QuantumExplorer and others added 3 commits July 16, 2026 23:58
A valid address collapses to a compact single-line card (middle-truncated,
pencil affordance) once focus leaves the field — the first keypad tap,
a scroll, or keyboard dismissal — so the form reads address-then-amount.
Tapping the locked card reopens the editable field with the cursor in it.
Pasted (clipboard chip) and scanned addresses lock immediately.

Co-Authored-By: Claude Fable 5 <[email protected]>
…lock-in

Sending to a shielded address from the Transparent balance was rejected
as a mismatch, but the SDK supports it: shieldedFundFromAssetLock takes
an arbitrary 43-byte Orchard recipient (Type 18 remainder semantics —
the recipient receives lock_value − pool_fee). Wire it as the
coreToShielded external route: valid source on the send form, asset-lock
execution with locking/proving progress, the internal transfer's fee
estimate, and a committed-lock-aware Try again that resumes the same
outpoint + recipient. Platform → shielded stays unsupported
(shieldedShield has no recipient parameter).

Also lock the address in as soon as it validates (paste or final typed
character) instead of waiting for focus to drop — software-keyboard-less
setups (simulator with a hardware keyboard) never drop focus on their
own, so the locked look never engaged there.

Co-Authored-By: Claude Fable 5 <[email protected]>
The three-tab landing (Send shortcut / center tab button) still showed
the old two-row action list (Scan QR / Send to address) on its Send tab,
one tap short of the form the balance-row sheet embeds. The Send tab now
IS the send form — un-pinned, with the full From picker — and the
action-row list, the Send-to-address push, and the QR fallback path it
needed are deleted (every landing scan now fills the embedded form).

Co-Authored-By: Claude Fable 5 <[email protected]>
@QuantumExplorer QuantumExplorer changed the title feat(payments): balance-row send sheet with Send and Internal tabs feat(ui): balance-row send sheet with Send and Internal tabs Jul 16, 2026
…ector #824, Topper fix #823) — keep send-sheet arrow wiring + adopt onInfo

Co-Authored-By: Claude Fable 5 <[email protected]>
@QuantumExplorer
QuantumExplorer merged commit 83f42c5 into swift-sdk-integration Jul 16, 2026
1 check passed
@QuantumExplorer
QuantumExplorer deleted the feat/balance-row-send-sheet branch August 7, 2026 08:23
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