From 919105507f4b0cdf592726cc9de7a73237ef4518 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 16 Jul 2026 16:53:30 +0200 Subject: [PATCH 1/2] fix: use fast fee for hw transfer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Bitkit/AppScene.swift | 2 +- Bitkit/ViewModels/HwFundingSigner.swift | 4 ++-- BitkitTests/HwFundingSignerTests.swift | 4 ++-- changelog.d/next/633.fixed.md | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelog.d/next/633.fixed.md diff --git a/Bitkit/AppScene.swift b/Bitkit/AppScene.swift index 5588eab02..6b3a862d7 100644 --- a/Bitkit/AppScene.swift +++ b/Bitkit/AppScene.swift @@ -87,7 +87,7 @@ struct AppScene: View { hwConnecting: trezorManager, hwFeeRateProvider: { guard let rates = await feeEstimatesManager.getEstimates() else { return nil } - return UInt64(SettingsViewModel.shared.defaultTransactionSpeed.getFeeRate(from: rates)) + return UInt64(TransactionSpeed.fast.getFeeRate(from: rates)) }, hwAddressProvider: { let addressType = LDKNode.AddressType.fromStorage(UserDefaults.standard.string(forKey: "selectedAddressType")) diff --git a/Bitkit/ViewModels/HwFundingSigner.swift b/Bitkit/ViewModels/HwFundingSigner.swift index b538a8b64..18876f655 100644 --- a/Bitkit/ViewModels/HwFundingSigner.swift +++ b/Bitkit/ViewModels/HwFundingSigner.swift @@ -27,7 +27,7 @@ struct HwFundingSigner { /// (a `sendMax` compose) is unavailable. var txVBytes: UInt64 = 1200 /// Minimum fallback fee rate when fee estimates are temporarily unavailable. - var fallbackSatsPerVByte: UInt64 = 1 + var fallbackSatsPerVByte: UInt64 = 3 /// Fallback fee percentage used when fee estimates are temporarily unavailable. var fallbackFeePercent: Double = 0.1 @@ -192,7 +192,7 @@ struct HwFundingSigner { balanceSats: UInt64, satsPerVByte: UInt64?, txVBytes: UInt64 = 1200, - fallbackSatsPerVByte: UInt64 = 1, + fallbackSatsPerVByte: UInt64 = 3, fallbackFeePercent: Double = 0.1 ) -> UInt64 { guard let satsPerVByte else { diff --git a/BitkitTests/HwFundingSignerTests.swift b/BitkitTests/HwFundingSignerTests.swift index 574f0c1b9..8e2e4ed49 100644 --- a/BitkitTests/HwFundingSignerTests.swift +++ b/BitkitTests/HwFundingSignerTests.swift @@ -35,8 +35,8 @@ final class HwFundingSignerTests: XCTestCase { } func testFeeReserveFallbackUsesFloorWhenPercentSmaller() { - // 10% of 5,000 = 500, below the 1 * 1200 floor. - XCTAssertEqual(HwFundingSigner.feeReserve(balanceSats: 5000, satsPerVByte: nil), 1200) + // 10% of 5,000 = 500, below the 3 * 1200 floor. + XCTAssertEqual(HwFundingSigner.feeReserve(balanceSats: 5000, satsPerVByte: nil), 3600) } // MARK: - Availability diff --git a/changelog.d/next/633.fixed.md b/changelog.d/next/633.fixed.md new file mode 100644 index 000000000..31b1d3e18 --- /dev/null +++ b/changelog.d/next/633.fixed.md @@ -0,0 +1 @@ +Hardware wallet transfers to spending now use a faster on-chain fee rate so funding confirms more reliably. From 56945e667f1d1e0cf8c456d3a5164effa6075aea Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 16 Jul 2026 16:53:54 +0200 Subject: [PATCH 2/2] chore: rename changelog fragment Co-authored-by: Cursor --- changelog.d/next/{633.fixed.md => 634.fixed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/next/{633.fixed.md => 634.fixed.md} (100%) diff --git a/changelog.d/next/633.fixed.md b/changelog.d/next/634.fixed.md similarity index 100% rename from changelog.d/next/633.fixed.md rename to changelog.d/next/634.fixed.md