Skip to content

bug: spending confirm swipe can pay a different amount than the screen #1361

Description

@ovitrif

Twin: synonymdev/bitkit-ios#783
Refs: #1323 (comment)

What happened?

On transfer to spending, confirm shows a total from a funding plan built before the Blocktank order exists. Since #1247 the order is created on swipe. The swipe then rebuilds the plan against the order: its address and fee, fresh balances and a fresh fee rate. It pays that rebuilt plan without showing it, so the network fee, the send-all choice and the total that leaves can differ from the screen.

ensureSpendingOrder stops the payment only when the order fee is higher than the fee on screen. Any other difference pays on the same swipe.

Raised by @jvsena42 in the review of #1323. #1247 is not in 2.5.0, so this reaches users with 2.6.0 unless fixed first.

Expected behavior

When the rebuilt amount differs from the amount on screen, the screen shows the new amount and the payment waits for another swipe.

Steps to Reproduce

  1. Open transfer to spending and reach confirm.
  2. Leave it until the fast fee rate changes.
  3. Swipe to pay.
  4. Compare the amount that leaves with the total that was on screen.

Logs / Screenshots / Recordings

N/A

Bitkit Version

master since #1247 (after 2.5.0)

Device / OS

Android. iOS has the same rebuild: synonymdev/bitkit-ios#783.

Reproducibility

When the plan rebuilt at swipe differs from the plan on screen.

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

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions