Repository navigation
feat(wallet): domain model for sending to any destination - #1406
Open
romchornyi wants to merge 1 commit into
Open
romchornyi wants to merge 1 commit into
romchornyi wants to merge 1 commit into
Conversation
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.
Issue being fixed or feature implemented
First part of the new external Send for MO-1121 (Android parity: dash-wallet#1680): pay from every balance (Core, Shielded, Platform, Identity) to every destination type (Core address, Shielded address, Platform address, Identity ID). This PR adds only the domain model, so it can be reviewed without any UI or money movement.
What was done?
DestinationandDestinationParser: the destination type from typed, pasted, scanned or linked text (Core, Platform and Shielded addresses, Identity IDs,dash:links with an amount), network checks, and a length bound before Base58/Bech32m decoding.SendPairPolicy: one pure rule set for every source × destination pair — the route, or the reason the pair is unavailable — plus the Confirm warnings. [ADR-0038] (added in feat(wallet): new Send screens and entry points #1409)AmountRules: Max, the DashPay reserve on Identity, the balance check.SendOutcome: every send ends as sent, not sent (with Retry) or in progress (no Retry); the mapping from the existing send errors. [ADR-0040] (added in feat(wallet): new Send screens and entry points #1409)ScriptAddressCodec/PaymentNetworkResolver/DWParsedPaymentURI: the address decoding helpers the parser shares with the existing Send;SendScreennow takes its warning texts from the sharedSendWarningText.WalletSendService:ErrorCodeanderrorDomainreadable outside the file so the outcome mapping can name existing send errors.Nothing calls the new types from a screen yet; the services come in #1407 and the screens in #1409. Code comments cite ADRs whose public copies are added in #1409.
Stack
This replaces the single PR #1358 (+21k lines), split by layer so each part can be reviewed and merged on its own. Merge in order:
chore(l10n): drop unused keys and sort the catalogs as BartyCrouch writes them (keeps the diffs below clean)How Has This Been Tested?
dashwallet-dashpay, Debug, iPhone 17 simulator (iOS 26.5): 2374 tests, 0 failures, 1 skipped.DestinationParserTests,SendPairPolicyTests,AmountRulesTests,SendOutcomeMappingTests, the Bech32m URI case inPaymentProtocolTestsscripts/a11y_audit.py --check, and a second build leaves the catalogs unchangedBreaking Changes
None.
Checklist:
🤖 Generated with Claude Code
Summary by CodeRabbit