Skip to content

bug: swap send can pay twice when backing out mid-commit #1836

Closed

Description

@ovitrif

While a swap-routed send is committing, the user can back out of Confirm, get a fresh quote and pay the contact a second time.

Steps

  1. Pay a contact through a Pubky Swaps route, with the regtest debug flag on.
  2. Swipe to pay while the provider is slow to commit. bitkit-core's commit_route keeps polling a provider that answers pending for up to 60 s.
  3. Back out of Confirm and tap Continue on Amount. A new quote replaces the first one.
  4. The first commit returns. Because its quote is no longer current, its hold invoice is paid without moving the send to Pending.
  5. The submission guard is released. Swiping the re-quoted Confirm commits and pays a second swap to the same address.

Fix options

  • Refuse a re-quote or commit for this send while a swap submission is running.
  • Disable back on Confirm during a swap commit.

The test swap route claim wait leaves a re-quoted send free to pay asserts the second commit today, so it needs updating with the fix. iOS twin: synonymdev/bitkit-ios#1266.

Found in review of #1732: #1732 (comment)

Activity

  1. added this to the 3.3.0 milestone on Nov 10, 2026
  2. self-assigned this
    on Nov 14, 2026
  3. modified the milestones: 3.3.0, 3.2.0 on Nov 26, 2026
  4. ovitrif commented on Nov 26, 2026

    @ovitrif
    CollaboratorAuthor

    Moved to milestone 3.2.0: the fix, #1923, is on master, so it ships in 3.2.0.

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