Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bitkit/AppScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions Bitkit/ViewModels/HwFundingSigner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions BitkitTests/HwFundingSignerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions changelog.d/next/634.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hardware wallet transfers to spending now use a faster on-chain fee rate so funding confirms more reliably.
Loading