Skip to content

fix: prevent false success for rejected on-chain sends #717

Description

@ovitrif

Parent: #712
Source: Pubky marketplace Bitkit team brief
Counterpart: synonymdev/bitkit-android#1211

Scope

  • Reproduce the stale Electrum-tip/non-final transaction case from the brief.
  • Determine whether ownership lies in Bitkit, LDK Node, or the Electrum integration, and link any upstream issue.
  • Make the send result distinguish accepted broadcast from local submission when the backend rejects or drops the transaction.

Acceptance criteria

  • The reproduced non-final transaction is not shown as Bitcoin Sent.
  • A clean-wallet accepted transaction still completes normally.
  • Regression coverage records the expected signal.

Why this is required for 2.6.0

Required for Shop support in Bitkit 2.6.0: buyers must be able to tell whether an on-chain payment was accepted and recover an uncertain checkout without paying twice.

  • Prevent false success: Bitkit must not show “sent” or deliver payment proof when the backend rejected the transaction or acceptance is still unknown; the Shop order may remain unpaid.
  • Prevent accidental double payment: reopening or retrying an uncertain checkout must retain the original payment instead of starting a separate payment.
  • Preserve the merchant amount on retry: use only the original inputs and recipient amount; a Max payment without enough fee headroom must fail safely rather than reduce what the merchant receives.
  • Resolve stale Pending state: once the exact original payment succeeds and its local follow-up is saved, the app must reflect that result.
  • Preserve protection after wallet restore: restoring a backup must retain the unresolved payment guard so it cannot silently authorize another send.

These are release acceptance requirements. Final Shop checkout still needs validation against the Paykit/server versions selected for 2.6.0.

Activity

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions