Skip to content

fix: use fast fee for hw transfer#634

Merged
piotr-iohk merged 2 commits into
masterfrom
fix/633-hw-transfer-fast-fee
Jul 17, 2026
Merged

fix: use fast fee for hw transfer#634
piotr-iohk merged 2 commits into
masterfrom
fix/633-hw-transfer-fast-fee

Conversation

@piotr-iohk

Copy link
Copy Markdown
Collaborator

Fixes #633

This PR makes Trezor → spending funding use the same fast on-chain fee rate as savings → spending, so LSP channel funding confirms more reliably.

Description

  • Uses the fast fee tier for hardware-wallet transfer funding instead of the settings default (normal), which can resolve to 1 sat/vB in a quiet fee market.
  • Raises the estimate-unavailable fallback from 1 to 3 sat/vB so compose still picks a usable rate when fee estimates are missing.
  • Updates fee-reserve unit coverage for the new fallback floor.

Related Android: synonymdev/bitkit-android#1088

Linked Issues/Tasks

Screenshot / Video

N/A

QA Notes

Manual Tests

  • 1. Pair Trezor with spendable UTXOs → Transfer → Spending → Sign: funding tx uses a fast-tier sat/vB (check explorer), not ~1 sat/vB when the market’s mid is 1.
  • 2. Complete HW transfer → Spending: funding confirms and the transfer progresses toward channel open without lingering unconfirmed for hours under a normal fee market.
  • 3. regression: Savings → Transfer → Spending: still uses fast and completes as before.

Automated Checks

  • Unit tests modified: update fee-reserve floor expectation (3 × 1200) in HwFundingSignerTests.swift.
  • Local: xcodebuild test for HwFundingSignerTests.
  • CI: standard build and test checks run by the PR bot.

Made with Cursor

piotr-iohk and others added 2 commits July 16, 2026 16:53
Trezor → spending funding was using the settings default fee tier
(normal), which can resolve to 1 sat/vB and leave channel funding
unconfirmed while savings already uses fast. Align HW funding to
fast and raise the estimate-unavailable fallback from 1 to 3 sat/vB.

Fixes #633

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR increases the fee rate used for hardware-wallet funding. The main changes are:

  • Uses the fast fee tier for hardware-wallet transfers to spending.
  • Raises the unavailable-estimate fallback from 1 to 3 sat/vB.
  • Updates the reserve-floor test and changelog.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The fast-tier conversion is a safe numeric widening.
  • The composition and reserve paths consistently use the new fallback.
  • Balance subtraction remains guarded when the reserve exceeds the balance.

Important Files Changed

Filename Overview
Bitkit/AppScene.swift Selects the fast fee tier for hardware-wallet funding.
Bitkit/ViewModels/HwFundingSigner.swift Raises the fallback fee-rate defaults from 1 to 3 sat/vB.
BitkitTests/HwFundingSignerTests.swift Updates the fallback reserve-floor expectation to 3,600 sats.
changelog.d/next/633.fixed.md Documents the faster hardware-wallet funding fee.

Reviews (1): Last reviewed commit: "chore: rename changelog fragment" | Re-trigger Greptile

@piotr-iohk
piotr-iohk requested a review from jvsena42 July 16, 2026 15:33
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

Tested end-to-end on mainnet (Trezor → spending / Blocktank channel open).

  • Funding tx used ~2 sat/vB (Blocktank fast; not the previous ~1 sat/vB mid/default path).
  • Tx confirmed within minutes and the channel opened successfully.
  • Previously the same flow could sit unconfirmed for hours at ~1 sat/vB.

Fix confirmed end-to-end on mainnet.

@piotr-iohk
piotr-iohk requested a review from pwltr July 17, 2026 08:43
@piotr-iohk
piotr-iohk enabled auto-merge July 17, 2026 08:52

@pwltr pwltr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@piotr-iohk
piotr-iohk merged commit ee690c3 into master Jul 17, 2026
17 of 19 checks passed
@piotr-iohk
piotr-iohk deleted the fix/633-hw-transfer-fast-fee branch July 17, 2026 08:59
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]: Trezor transfer to spending uses low on-chain fee rate

2 participants