fix: validate SS58 in deep links and repair checkphrase failure path (L9) - #580
Merged
Conversation
…(L9) - /pay deep links now validate the recipient with isValidSS58Address before pre-filling the send flow; invalid links are dropped - Shared-account sheet validates the address before navigating to send, showing an error toast and failing closed on invalid input - HumanReadableChecksumService.getHumanReadableName returns null instead of '' on error so the _recipientChecksum != null gate works, and cache eviction now uses the same '#U'-suffixed key as the cache store Addresses finding L9 of the 2026-07-22 mobile wallet security audit.
Collaborator
Author
🔍 Review — L9 (deep-link SS58 validation & checkphrase failure path)Verdict: 🟡 Approve with non-blocking comments The PR correctly closes two unvalidated recipient-entry points (deep-link What it does
Strengths
Findings
Verification
🤖 AI-assisted review generated with Claude Code |
- receive screen: degrade to blank checkphrase on lookup failure instead of an unbounded loader - use a neutral invalidAddress l10n key in the shared-address sheet instead of the add-hardware-account key - checksum service: swallow abandoned completer future on init failure so it no longer surfaces as an unhandled async error - add unit/widget tests for PaymentIntent parsing, /pay deep-link fail-closed behavior, checkphrase service, and the shared-address sheet send guard
…checksum # Conflicts: # mobile-app/lib/features/components/shared_address_action_sheet.dart # mobile-app/lib/services/deep_link_service.dart # quantus_sdk/lib/src/services/human_readable_checksum_service.dart
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.
Summary
/pay): the recipient address is now validated withSubstrateService.isValidSS58Address— the same validator used at send-flow entry — before the payment intent is set. Links with a missing or invalidtoparameter are dropped (fail closed)._sendToAddressvalidates the address before navigating to the send flow; on invalid input it shows an error toast and does not proceed (fail closed).HumanReadableChecksumService.getHumanReadableNamenow returnsnullinstead of''on error (isolate failure, empty result, or exception), so the_recipientChecksum != nullgate on the review screen actually works and the anti-phishing checkphrase no longer silently disappears. Callers that need a non-null string (checksumNameProvider,getMyInviteCode, cold-walletcheckphraseProvider) coalesce to''locally; all other callers already stored the result inString?fields.addresswhile the store key isaddress + '#U'; both now use the identical key.Addresses finding L9 of the 2026-07-22 mobile wallet security audit.
Verification
dart analyze: no issues in mobile-app, quantus_sdk, and cold-wallet-appflutter test test/unitin mobile-app: all 222 tests passed