feat(dashpay): add contact via QR code (My QR / Scan QR) - #1554
Draft
PastaPastaPasta wants to merge 3 commits into
Draft
feat(dashpay): add contact via QR code (My QR / Scan QR)#1554PastaPastaPasta wants to merge 3 commits into
PastaPastaPasta wants to merge 3 commits into
Conversation
Remove a duplicate android.content.res.Configuration import in MenuItem.kt and drop the subtitleMaxLines arguments passed to ActionItem, which has no such parameter (its subtitle is already limited to a single line). Both were introduced in 74bd90a and fail compilation (master CI is red on that commit). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Strict parser/codec for the dashpay://user?id=<base58-identity-id>&username=<label> payload shared with iOS DashPayUserLink.swift: scheme/host/param names case-insensitive; userinfo, port, path, fragment, duplicate and unknown params rejected; id must decode to 32 bytes; a trailing .dash is tolerated and stripped. The JUnit vectors mirror the iOS DashPayUserLinkTests byte for byte - they are the cross-platform contract and must stay in sync between the repositories. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…reen My QR opens a bottom sheet with the user's dashpay://user link rendered on a forced-white card (kept white in dark mode for scanner contrast, matching iOS); it requires a registered identity with a username. Scan QR launches ScanActivity; scanned payloads are parsed strictly (payment/invitation QRs get a targeted error instead of falling through to InputParser), own-QR shows a notice, known contacts open the user sheet directly, and everyone else is verified against Platform (profile + DPNS via PlatformRepo.updateDashPayProfile) before the DashPayUserBottomSheet opens - only Platform-verified data is displayed, the QR's username param is just an early mismatch check. Includes loading and retryable-error states, Transifex strings, and UsersContacts analytics events. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
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: trueThanks 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
Ports the iOS "add contact via QR" feature to Android: a user can show a QR code identifying their DashPay identity, and scan another user's code to land on the send-contact-request sheet.
DashPayUserLinkimplements the shareddashpay://user?id=<base58-identity-id>&username=<label>payload, mirroring iOSDashPayUserLink.swiftexactly (case-insensitive scheme/host/param names; rejects userinfo/port/path/fragment/duplicate/unknown params;idmust decode to 32 bytes; trailing.dashtolerated and stripped).DashPayUserLinkTestports the iOS acceptance/rejection vectors byte-for-byte — these tests are the cross-platform contract and should stay in sync withDashPayUserLinkTests.swift.InputParser); own-QR shows a notice; known contacts skip straight to the sheet; everyone else is verified against Platform viaPlatformRepo.updateDashPayProfile()— only Platform-resolved profile/DPNS data is displayed, with the QR'susernameparam used solely as a mismatch check. Loading state + retryable error dialog on failure. On success the existingDashPayUserBottomSheethandles send-request and refresh.AnalyticsConstants.UsersContactsevents for show-my-QR / scan / scan-success.Deferred (as planned): the OS-level
dashpay://usermanifest deep link — iOS only ever emits this URI inside a QR, and in-app scanning covers the feature.Also includes a standalone commit repairing the master build (current master HEAD fails CI): a duplicate
Configurationimport inMenuItem.ktandsubtitleMaxLinesarguments passed toActionItem, which has no such parameter (its subtitle is already single-line).Verification
:wallet:compile_testNet3DebugKotlinpassesDashPayUserLinkTest6/6 passes (:wallet:test_testNet3DebugUnitTest)ktlintCheckpassesQA notes
Suggested two-device testnet smoke:
🤖 Generated with Claude Code