Repository navigation
feat(wallet): decide a failed Platform payment by the wallet's payment class - #1432
Draft
romchornyi wants to merge 2 commits into
Draft
romchornyi wants to merge 2 commits into
romchornyi wants to merge 2 commits into
Conversation
…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 <noreply@anthropic.com>
… 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 <noreply@anthropic.com>
|
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. |
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