Skip to content

fix(dashpay): open DashConnect codes from the Home scanner - #1236

Closed
llbartekll wants to merge 1 commit into
feat/app-connect-request-v2from
fix/home-scan-dashconnect-qr
Closed

llbartekll wants to merge 1 commit into
feat/app-connect-request-v2from
fix/home-scan-dashconnect-qr

Conversation

@llbartekll

Copy link
Copy Markdown
Contributor

Summary

The Home Scan QR shortcut only understood payment codes, so scanning a DashConnect login QR (dash-key: / dash-st:) failed with "Not a Dash QR code". Users had to know to open More → Connections and scan from there.

Now the Home scanner recognizes a DashConnect URI and opens the Connections screen with it, the same route a tapped dash-key: / dash-st: link already takes (MainTabbarController.openDashConnect).

Stacked on #1204 (feat/app-connect-request-v2), so a scanned App Connect v2 request goes into the v2 flow.

Changes

  • DWQRScanModel: before the payment parse, a scanned DashConnect URI is handed to the new optional delegate method qrScanModel:didScanDashConnectURI:. A delegate that doesn't implement it gets the old behavior.
  • HomeViewController: the only implementer. It dismisses the scanner and calls openDashConnect. The lock screen and the Send / Enter Address scanners still treat these codes as not-a-payment.
  • DashConnectDeepLink: adds uriFromString:, so the deep link and the scanner share one scheme check (DashConnectUri.isKeyUri / isStUri).
  • Malformed payloads are still reported by the Connections screen, as for a tapped link.

Testing

  • iPhone 13 Pro, develop-based build of this change: Scan shortcut → Yappr login QR → Connections → approval sheet → connection approved.
  • DashConnectUriTests: 25/25 pass on the develop-based build, including 2 new tests. They check that the scanned-string check accepts dash-key: / dash-st: (with surrounding whitespace) and rejects an address, dash:, pay:, https: and an empty string.
  • On this base: compiled feat(dashpay): decode App Connect request v2 and seal its response #1204's DashConnectUri / AppConnectRequest together with DashConnectDeepLink and ran them on the real Yappr staging v2 QR (dash-key:…?n=t&v=2&cb=https://yap.pr/staging/connect/…). The Home scanner routes it, and parseAppConnectRequest decodes it.
  • Not run locally on this base: a full app build. It needs the a9336f9486 platform pin, so that is left to CI.

🤖 Generated with Claude Code

The Scan shortcut's scanner only understood payment codes, so a
dash-key: / dash-st: QR was rejected as "Not a Dash QR code". The scan
model now hands a DashConnect URI to a delegate that implements the new
optional qrScanModel:didScanDashConnectURI:, before the payment parse.
Only Home implements it, and routes the code to the Connections screen
the same way a tapped DashConnect link does. The Send and lock-screen
scanners are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45d50e6a-fece-4af0-851c-e6af510b4cd2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

⛔ Final review complete — 1 blocking finding(s) (commit e57bf17) · triage: low

@llbartekll llbartekll changed the title fix(dashconnect): open DashConnect codes from the Home scanner fix(dashpay): open DashConnect codes from the Home scanner Oct 21, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The Home-only routing is correctly scoped and preserves existing payment handling for other scanner delegates. However, the advertised App Connect v2 outcome is not implemented at this exact head: the production Connections entry point still sends dash-key requests to the v1-only parser. Current CI checks, including simulator unit tests, pass; this verification was static, with no local builds or tests run.

🔴 1 blocking

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — The diff adds a small, contained scanner-routing path using existing URI recognition and connection handling, without changing payment execution, key handling, or protocol parsing.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 94% left; passed over gemini-3.8-flash-high (lane failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `DashWallet/Sources/UI/Home/HomeViewController.swift`:
- [BLOCKING] DashWallet/Sources/UI/Home/HomeViewController.swift:757-760: The new scanner route does not reach an App Connect v2 flow
  This handoff reaches openDashConnect → DashConnectHostingController → ConnectionsViewModel.onURIReceived → PlatformDashConnectDataSource.parseQR. At lines 539–542, parseQR unconditionally sends dash-key requests to parseKeyRequest, whose envelope parser requires v=1. parseAppConnectRequest has no production caller. Consequently, scanning a v2 login request opens Connections but rejects the request instead of presenting the advertised v2 approval flow. Exercising the v2 parser separately, or observing approval on a different develop-based build, does not validate this production route at the reviewed head.

  The missing integration is inherited from the base, and the scanner plumbing itself is correct, but this PR explicitly promises that scanned App Connect v2 requests enter the v2 flow. Complete that integration in the owning DashConnect data-source/ViewModel flow and add regression coverage through the production request entry point. If this PR is intentionally scanner-routing-only, correct the description and testing claims and link a follow-up tracking the deferred v2 integration; no such tracking is supplied.

Comment on lines +757 to +760
func qrScanModel(_ viewModel: DWQRScanModel, didScanDashConnectURI uri: String) {
dismiss(animated: true) { [weak self] in
(self?.tabBarController as? MainTabbarController)?.openDashConnect(uri)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: The new scanner route does not reach an App Connect v2 flow

This handoff reaches openDashConnect → DashConnectHostingController → ConnectionsViewModel.onURIReceived → PlatformDashConnectDataSource.parseQR. At lines 539–542, parseQR unconditionally sends dash-key requests to parseKeyRequest, whose envelope parser requires v=1. parseAppConnectRequest has no production caller. Consequently, scanning a v2 login request opens Connections but rejects the request instead of presenting the advertised v2 approval flow. Exercising the v2 parser separately, or observing approval on a different develop-based build, does not validate this production route at the reviewed head.

The missing integration is inherited from the base, and the scanner plumbing itself is correct, but this PR explicitly promises that scanned App Connect v2 requests enter the v2 flow. Complete that integration in the owning DashConnect data-source/ViewModel flow and add regression coverage through the production request entry point. If this PR is intentionally scanner-routing-only, correct the description and testing claims and link a follow-up tracking the deferred v2 integration; no such tracking is supplied.

source: glm-5.3-flash (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general)

@llbartekll

Copy link
Copy Markdown
Contributor Author

Superseded by #1237, which carries this commit plus the follow-up (a Home-scanned code goes in as a scan, so App Connect doesn't open the browser callback, and a "Connected — go back to your browser" alert after the sign-in), based on the qa/yappr-login commit TestFlight 9.1.4 (12) was built from and verified on device.

@llbartekll llbartekll closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants