Repository navigation
feat(payments): balance-row receive sheet with full internal transfer routes - #817
Merged
QuantumExplorer merged 1 commit intoJul 16, 2026
Conversation
… routes
Home balance rows: every row's receive (down) arrow now opens a focused
two-tab sheet — a Receive QR for the tapped balance and an embedded
Internal transfer form — instead of routing Platform/Shielded straight
into the transfer screen. The hero selector (Receive | Internal) is the
sheet's top chrome (no X/title row); the destination card stays pinned
at the bottom of the transfer form with the source rows above it and no
swap badge. The full three-tab landing (with Send) is unchanged for the
Receive/Send shortcuts.
Receive: the landing's network toggle gains Shielded — the wallet's
default Orchard payment address, read via shieldedDefaultAddress and
bech32m-encoded for display (HRP dash/tdash + 0x10 type byte). The Send
toggle deliberately does not gain it (ChainNetworkToggle now takes an
options list).
Internal transfers: InternalTransferRoute (six routes) becomes the
canonical model for validation, fees, and execution. New Core↔Platform
legs complete the matrix:
- Core → Platform via an AssetLockAddressTopUp (funding type 4) asset
lock through PlatformAddressSyncCoordinator.fundFromCore, with
status polling and resume-on-retry so a committed lock is never
stranded.
- Platform → Core credit withdrawals: partial amounts pay out exactly
the requested value via explicit input selection (new swift-sdk
wrapper over platform_address_wallet_withdraw_to_address; committed
in the platform repo), while Max uses the AUTO full-balance path.
The withdrawal preflight feeds fee headroom, the Max amount, and the
confirm sheet's exact fee row.
The confirm sheet derives labels, fee estimates, step checklists, and
timing/privacy tips from the route.
Transaction history: internal transfers now carry their route — a
source icon with a destination badge (Core → Shielded, Shielded → Core)
— and Shielded → Core payouts are titled "Shielded withdrawal" instead
of a plain "Received".
Fixes shaken out along the way:
- Transparent-row arrows and balance long-press did nothing: the home
SwiftUI content captured the shortcuts delegate before the
controller assigned it; resolve it at tap time instead.
- Syncing alert clipped its OK button once the async peers section
grew the content: hosting controller now tracks intrinsic size.
- Phantom ~50pt top inset on the payments landing: it never opted out
of BaseNavigationController's bar re-show pass (NavigationBarDisplayable).
- topController() stopped one level into the presentation stack, so
the PIN prompt silently failed to present over stacked sheets
("Authentication failed" on every gated transfer from the new sheet).
- Transfer screen fits small heights by scrolling its upper content
while the keypad stays pinned.
UI copy: transfer cards read Transparent/Platform/Shielded (no
"balance"), card amounts cap at 5 fraction digits (display only), and
the amount unit pills show DASH plus the active fiat code.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The home balance rows' receive (↓) arrows now open a focused two-tab sheet — Receive QR + embedded Internal transfer — for the tapped balance, and the internal transfer engine gains the missing Core↔Platform routes, completing the 6-route matrix between Transparent, Platform, and Shielded balances.
Receive sheet (new surface)
shieldedDefaultAddress, bech32mdash1…/tdash1…with the0x10type byte). The Send toggle deliberately does not gain it.Internal transfer routes
InternalTransferRoute(6 routes) is now the canonical model for validation, fee reserves, Max, and execution; the confirm sheet derives labels, fee rows, step checklists, and timing/privacy tips from it.AssetLockAddressTopUp(funding type 4) asset lock viaPlatformAddressSyncCoordinator.fundFromCore, with lock-status polling and resume-on-retry (a committed lock is never stranded).History rows
Fixes shaken out
HomeViewControllerassigned it. Now resolved at tap time.sizingOptions = .intrinsicContentSize).BaseNavigationControllerre-showing a transparent nav bar (NavigationBarDisplayableconformance).topController()didn't recurse intopresentedViewController, so the PIN prompt silently failed to present over stacked sheets — every auth-gated transfer from the new sheet reported "Authentication failed". One-line traversal fix; hardens all "present from the top" callers.Copy/format
Cards read Transparent/Platform/Shielded; card balances cap at 5 fraction digits (display only); unit pills show DASH + the active fiat code (e.g. THB).
Cross-repo dependency
The partial withdrawal uses a new Swift-only wrapper in the platform repo (
ManagedPlatformAddressWallet.withdraw(accountIndex:coreAddress:inputs:signer:), commit5043b867c9onv4.1-dev-local). No FFI/xcframework rebuild required — the FFI entry point already ships. Needs upstreaming with the rest of the platform pin per DASHSYNC_MIGRATION.md.Testing
Testnet smoke on the QA-iPhone16 simulator: receive QRs for all three balances; Core→Shielded, Shielded→Core, Core→Platform (25 tDASH end-to-end incl. PIN gate, lock polling, balance refresh), Platform→Core partial + Max preflight; sync alert; landing layouts. Unit-test target is pre-existing-broken per CLAUDE.md — verification standard was clean dashpay build + testnet smoke of touched flows.
🤖 Generated with Claude Code