Repository navigation
feat(wallet): decide a failed Platform payment by the wallet's payment class - #1432
Draft
romchornyi wants to merge 7 commits into
Draft
romchornyi wants to merge 7 commits into
romchornyi wants to merge 7 commits into
Conversation
The pure core of the new external send, with no screen or service using it yet: the destination types and a parser for every address form, link and Identity ID (network-checked), the four send sources and the routes between them, one policy that decides every source and destination pair, the amount rules, the Confirm warnings, and the three send outcomes the errors of the existing spend paths map to (only "not sent" offers Retry). Supporting changes: ScriptAddressCodec decodes an address's form and hash whatever its network, DashAddressClassifier decodes bech32m without reading the global network, PaymentNetworkResolver maps any network kind, and WalletSendService's error domain and codes become readable so a send outcome can be told from them. The old Send's Confirm texts move to SendWarningText so both Sends show the same words. The feature's decisions are recorded as ADR-0036 to ADR-0045 (docs/adr/). Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: 306145f65dadd33ec186527e30890c7bb756d635
…equest checks The services behind the new external send, with no screen calling them yet: an executor that prepares and sends every source and destination pair over the existing spend paths, a fee estimator, an Identity lookup that does not block the main actor, and a fetcher for dash: payment requests. A Core payment to someone else's Platform address records its recipient by the asset lock's outpoint, so recovery after a crash pays that recipient and never the wallet's own address; a lock whose recipient cannot be told is not offered a retry, and locks the wallet marks as its own from this release on keep resuming as before. A BIP70 payment the merchant acknowledged before the broadcast failed, or before the request expired, is reported as in progress rather than not sent. Shared helpers the executor reuses: the identity top-up from Platform or Shielded credits moves out of the profile sheet, the Unicode-name spelling of merchant text is shared by both Sends, and the restore-sync gate of a Core spend can be observed. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: 5d5b668099682851d541bb92b75d2c6c0a8d87ca
…failed as in progress A gift-card payment whose Payment the merchant acknowledged, and whose broadcast then failed or whose request then expired, reached DashSpend as a plain error without the txid, while the merchant holds the signed bytes and may fulfil the order. payWithDashUrl now maps it to the same in-progress error as an unknown broadcast outcome, carrying the txid, so the purchase is recorded and the card details screen opens. The BIP70 service it pays through can be injected, so the mapping is tested against a fake wallet and merchant. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: 5d5b668099682851d541bb92b75d2c6c0a8d87ca
The new Send flow on top of the domain model and services: Address (paste, scan, clipboard, Identity lookup), Select source, the amount step with Max, Confirm with the fee and warnings, and the sending, in-progress and failed outcomes. It opens from the Payments send menu, the balance rows, the QR scanner (an Identity ID is accepted) and dash: links, and the old Send keeps contact payments. The Internal transfer sheet no longer has a send-from mode, since the balance-row Send opens the new flow. The public summary is docs/features/external-send/README.md; the decisions (ADR-0036 to ADR-0045) came with the domain model. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: abcc8fadb9369590f2862c6e14f8926be8e593cf
A Core to Platform or Core to Shielded send whose Platform step failed after the asset lock was broadcast and recorded was reported as inFlight, with the "It will finish on its own" Toast, but nothing finished it: only Rebroadcast in the transaction details resumes the lock. The executor now reports such a send as lockHeld, carrying the lock's outpoint and funding type. It opens its own sheet: "Your Dash is held for this transfer. Finish it now, or later from the transaction details." Finish runs the same resume as Rebroadcast (AssetLockRecoveryService.retry, which asks for the PIN); Close leaves the lock for the transaction details. inFlight keeps meaning submitted with an unknown result. A Core to Identity send still reports inFlight: its top-up call returns no outpoint to resume. Co-Authored-By: Claude Opus 5.5 <[email protected]> SDD-Published-From: abcc8fadb9369590f2862c6e14f8926be8e593cf
…fixes (test branch, development only) test/external-send-delivery = #5928 head 730a15273e + the round's fixes; carries the Rust-owned payment class on every PlatformWalletError case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… payment class SendOutcome reads PlatformWalletError.delivery (dashpay/platform#5928): not sent only when the wallet classes the failure not sent, in progress for maybe sent, a held lock or an unclassified error; the error type only picks the reason's words. LiveCoreTwoStepSend.lockMayExist reads the same class. The app's type list is gone, so a new wallet error code needs no app change (ADR-0054). Pattern matches adapted to the SDK's payment payload on every PlatformWalletError case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Contributor
|
🕓 Review not started yet because this PR is a draft.
Commit 5c90cf2. Normal review starts when eligible; priority review starts as soon as a slot is available. |
4 of 8 tasks
romchornyi
force-pushed
the
feat/external-send-lock-held
branch
5 times, most recently
from
November 24, 2026 18:56
52f1d5e to
e0d5835
Compare
romchornyi
force-pushed
the
feat/external-send-lock-held
branch
4 times, most recently
from
November 27, 2026 06:26
4adde32 to
888305c
Compare
This branch has not been deployed
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.
Stacked on #1423 (base
feat/external-send-lock-held). Draft: it needs dashpay/platform#5928, which is not merged yet.What
The new Send decided whether a failed Platform payment left the wallet from a list of
PlatformWalletErrortypes kept in the app. dashpay/platform#5928 moves that decision into the Rust wallet: everyPlatformWalletErrornow carries a payment class (delivery: not sent, maybe sent, lock held). This PR makes the app read it.SendOutcomemaps aPlatformWalletErrorbydelivery:.notSent→ not sent (the type only picks the reason's words);.maybeSent,.lockHeldor unclassified → in progress. A held lock with its funding type still comes from the coordinator aslockHeld.LiveCoreTwoStepSend.lockMayExist(Core → Identity) reads the same class.AssetLockFailureStore,UsernameMarketplaceService,WalletSendService,EvonodeWithdrawalViewModel,MasternodeUnbanViewModel).Why: a wallet error the app's list did not know read as "in progress" although nothing was sent (for example an identity lookup that fails before any spend), and the list could drift the other way. With the class, a new wallet error code needs no app change. Related: #1427 (the wallet classes a nonce mismatch as maybe sent, so it stays in progress).
Pin
.platform-ref→79d5fe45acontest/external-send-delivery= #5928 head730a15273e+ its review fixes (nonce docs, example apps read the class, the wallet owns a panicked payment's class). Development-only; moves to the merged commit once #5928 lands.Testing
SendOutcomeMappingTests,ExternalSendExecutorTests,ConfirmViewModelTests,ExternalSendFlowTests,SendOutcomeRouterTests,AssetLockDiagnosticsTests,SendAmountViewModelTests,AddressViewModelTests: 513 tests, all green on the simulator against the pinned SDK; the whole test target compiles.🤖 Generated with Claude Code