Skip to content

perf: hardware funded requests run two compose calls #1187

Closed

Description

@jvsena42

What happened?

Opening a payment request that will be paid from a hardware wallet runs two hardware composeTransaction calls one after the other, about 7.3–7.5 s each. On #1014, which correctly blocks the swipe until hardware setup finishes, that adds up to about 15 s before the payment can be authorized:

  • the spinner ends after the first compose;
  • the arrow stays dimmed until the second compose ends, with no indicator in between.

Master f3e97b0 runs the same two composes but accepts the swipe immediately.

Expected behavior

One hardware compose per preparation, so a hardware-funded request is ready in about 7 s. A second compose should run only when its inputs (amount, fee rate, UTXOs) actually changed.

Steps to Reproduce

  1. Pair the Trezor emulator and keep Savings smaller than the request.
  2. Open a BTC or USD-quoted payment request from a contact.
  3. The log shows two composeTransaction completions about 7.5 s apart before the confirmation is ready.

Logs / Screenshots / Recordings

Timing on 1607a10, from Confirm shown to swipe accepted: 15.2, ~15.2–16.5, ~14.5–14.9 s (BTC 1,000,000), and 15.4, 14.9, 14.9 s (USD $609.38). In one probe, swipes were rejected from 21.1 s to 26.7 s, the swipe was accepted at 28.07 s, and the second compose ended at 28.12 s. On master, hwSend.preparePreview is called from SendAmountView.swift:380 and SendConfirmationView.swift:1947. I did not confirm which two calls run here.

Bitkit Version

master f3e97b0; also #1014 at 1607a10.

Device / OS

iPhone 17e simulator (iOS 26.5), Trezor emulator.

Twin: synonymdev/bitkit-android#1786

Activity

  1. added this to the 3.2.0 milestone on Nov 1, 2026
  2. self-assigned this
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions