Skip to content

feat: add QR scan tab to drawer QR sheet#500

Merged
barrydeen merged 2 commits into
mainfrom
feat/qr-scan-drawer
Apr 26, 2026
Merged

feat: add QR scan tab to drawer QR sheet#500
barrydeen merged 2 commits into
mainfrom
feat/qr-scan-drawer

Conversation

@barrydeen

Copy link
Copy Markdown
Owner

Summary

  • New Scan tab in the drawer QR sheet — opens the camera and decodes Nostr QR codes (npub, note, nprofile, nevent, naddr), with or without the nostr: prefix, and navigates directly to the matching profile / thread / article.
  • Extracts the existing wallet camera scanner into a reusable QrScanner component shared by the wallet and the drawer.
  • Centralizes NostrUriData → route mapping in Navigation.kt so the deep-link handler and the scanner share a single implementation.
  • Bumps version to 1.0.2 (76).

Test plan

  • Build & install: JAVA_HOME=~/Downloads/android-studio/jbr ./gradlew installDebug
  • Drawer → QR icon → confirm three tabs (Nostr, Lightning if lud16 set, Scan)
  • Tap Scan → grant camera permission → scan an npub1… QR → lands on profile
  • Repeat with note1, nprofile1, nevent1, and naddr1 (kind 30023)
  • Repeat each with the nostr: prefix stripped → same behavior
  • Scan an unrelated QR (e.g. a URL) → sheet stays open with "Not a Nostr QR" message
  • Wallet → Send → Scan QR — confirm Lightning invoice scanning still works (regression check)
  • Deny camera permission → permission-denied UI with Grant button

Adds a Scan tab alongside Nostr/Lightning in the drawer's QR sheet that
opens the camera and decodes Nostr entities (npub, note, nprofile, nevent,
naddr) — with or without the nostr: prefix — and navigates directly to
the matching profile, thread, or article.

Extracts the camera scanner from WalletScreen into a reusable QrScanner
component, and centralizes NostrUriData→route mapping as toRoute() in
Navigation.kt so the deep-link handler and scanner share it.
@barrydeen
barrydeen merged commit 413a069 into main Apr 26, 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.

1 participant