Skip to content

a later link drops a pending pubky sign-in request #1545

Closed as duplicate

Description

@jvsena42

Observed

Bitkit holds only one deferred scan. Two cases drop a Pubky sign-in link:

  1. A sign-in link opened on a cold start waits behind the PIN screen. A bitcoin: URI that arrives before unlock replaces it, and the sign-in request is lost:
    17:00:05.131 DEBUG [AppViewModel.kt] Replacing deferred scan from 'deeplink'
    
  2. A payment URI that arrives while the Pubky Authorize sheet is open replaces that sheet with Send.

Seen while gating #1514 at d790f34. That PR does not change this behaviour.

Expected

A sign-in request already on screen, or waiting for unlock, is not discarded by a later link. The later link runs after the sign-in sheet closes, as it already does during the restore wait (Queuing 'deeplink' scan for deferred handling).

Steps to reproduce

  1. Turn PIN on. Force-stop Bitkit and open a fresh pubkyauth://signin_grant link (adb shell am start -a android.intent.action.VIEW -d '<url>' to.bitkit.dev).
  2. While the PIN screen is up, open bitcoin:<address> the same way.
  3. Unlock. Send opens, and the sign-in request never appears.
  4. Separately, with the Authorize sheet open, open bitcoin:<address>. The sheet is replaced by Send.

Root cause

AppViewModel.deferLockedScan / deferredScan hold a single slot that the next deferred scan overwrites. A non-mustComplete scan replaces the current sheet.

Suggested fix

Queue deferred scans in order, or keep a pending sign-in until it is handled. Do not replace an open Sheet.PubkyAuth with a payment scan; queue the scan until the sheet closes.

Activity

  1. ovitrif commented on Oct 16, 2026

    @ovitrif
    Collaborator

    @jvsena42 thanks, this is the same pair of cases as #1542, filed a few minutes earlier from your #1514 device-test notes. Closing this one as a duplicate; #1542 is in 3.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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