Skip to content

Send scanner: a late camera or paste scan routes after Enter Manually #2029

Todo

Description

@jvsena42

Problem

On the Send recipient screen, a camera or paste scan that is still decoding can route after the payer has moved on, for example after tapping Enter Manually. The decoded route then replaces the screen the payer moved to.

AppViewModel.onAddressContinue keeps the decode job in sendVisitScanJob only when isNearbyRead is true (NFC and Bluetooth, added in #1883), so Enter Manually cancels those reads. Camera and paste scans are not tracked, so their late result still routes.

This is the behaviour on master. The iOS twin is synonymdev/bitkit-ios#1424.

Steps

  1. Open Send and scan a QR code whose decode takes a while (an LNURL-pay link on a slow connection).
  2. Tap Enter Manually before the decode returns.
  3. The LNURL amount screen replaces Enter Manually.

Expected

A scan result arriving after the payer left the scanner is dropped, as for NFC and Bluetooth reads.

Fix direction

Track the camera and paste scan jobs in sendVisitScanJob too, with a test in AppViewModelSendFlowTest.

Activity

  1. self-assigned this
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions