Skip to content

bug: expired unknown-outcome on-chain payment blocks all new on-chain sends #1551

Description

@ovitrif

Twin: synonymdev/bitkit-ios#986

What happened?

An on-chain Paykit payment whose broadcast outcome is unknown, and whose request has since expired, blocks every new on-chain send for good. Each new send opens that payment's Payment Pending screen ("Do not start a separate payment") and builds no transaction:

  • a new Pubky Shop checkout
  • a plain bitcoin: link
  • "Retry original payment"

The pending payment clears only when its transaction is seen on chain or a retry is accepted. A retry needs the Paykit request to still be valid, so once the request expires nothing can clear it. A payment whose broadcast was cut off by a dropped Electrum connection ends up in this state.

Expected behavior

Once a sync shows that none of the payment's transactions reached the mempool or the chain, and its request has expired, the user can cancel it. That releases its coins for new sends and keeps the Paykit payment proof rolled back. A payment that might still confirm is never cancelled.

Steps to Reproduce

  1. Start a Pubky Shop checkout and continue to Swipe To Pay for its on-chain payment.
  2. Make the Electrum server swallow requests (for example with the iOS repository's scripts/electrum-bridge.py in blackhole mode, with Electrum set to it), then swipe. The sheet shows "Its outcome is unknown".
  3. Keep the server unreachable until the request's deadline passes, then restore it.
  4. Start any new on-chain send.

Logs / Screenshots / Recordings

Found on iOS (recordings: synonymdev/bitkit-ios#971 (comment)). Android master has the same rule: an attempt with unknown evidence keeps blocksNextSend true until its transaction is observed, and retryOriginalOnchainSend fails ensurePaymentAllowed once the request has expired.

Bitkit Version

master (0266f9670).

Device / OS

Read from the code; not yet reproduced on an emulator.

Reproducibility

Expected always, once the request has expired.

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

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions