Skip to content

fix: wait for the fee rate before swipe to pay - #847

Draft
ovitrif wants to merge 2 commits into
masterfrom
fix/swipe-waits-for-fee-rate
Draft

ovitrif wants to merge 2 commits into
masterfrom
fix/swipe-waits-for-fee-rate

Conversation

@ovitrif

@ovitrif ovitrif commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #775

This PR keeps Swipe To Pay disabled until the fee rate has loaded.

Description

  • Keeps Swipe To Pay disabled, with the swipe's loading spinner, while an on-chain payment from the wallet has no fee rate yet, so a swipe can no longer fail with "Fee rate not set" while the fee-rate fetch is still running.
  • Resolves a missing fee rate at the start of the payment submit, before any warning, PIN check or Paykit payment proof, so a payment request is never consumed without a fee rate. This also covers the automatic payment path, which does not go through the swipe.
  • Lightning payments and hardware wallet sends keep their current rules: neither waits on the wallet fee rate.
  • Adds a changelog fragment.

Out of Scope

Design

N/A — no design available. The swipe reuses its existing disabled and loading states.

Preview

QA Notes

Journeys

N/A — not drivable; see Manual Tests.

Manual Tests

  • Throttle the network so the Blocktank info request is slow → open a Paykit payment request or an on-chain invoice → Send confirmation from savings → the swipe is dimmed with a spinner and does not move; once the fee rate loads it becomes enabled and the payment goes through — network throttling not in Capabilities
  • regression: Lightning invoice → Send confirmation → the swipe is enabled immediately, without waiting for the fee rate — network throttling not in Capabilities

Automated Checks

  • added SendConfirmationSwipeTests.swift — on-chain payment without a fee rate disables the swipe, and it enables once a rate is set
  • added SendConfirmationSwipeTests.swift — Lightning and hardware payments never wait on the wallet fee rate

Swipe to pay on the send confirmation stays disabled and shows its loading state while an on-chain payment has no fee rate yet. submitPayment also resolves a missing fee rate before anything is consumed, so an automatic payment never starts without one.
@ovitrif ovitrif self-assigned this Sep 30, 2026
@ovitrif ovitrif changed the title fix: disable swipe to pay until the fee rate is loaded fix: wait for the fee rate before swipe to pay Sep 30, 2026
@ovitrif

ovitrif commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 9be9583: renamed the changelog fragment to this PR's number, as pr.md asks once the PR exists. No code change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: swipe to pay is enabled before a fee rate is loaded and the send fails with "Fee rate not set"

1 participant