You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
On-chain send can pay a different fee rate than Confirm showed #1722
LightningRepo.sendOnChain takes a feeRates: FeeRates? = null parameter. With it left null, it resolves getFees() again when the user swipes. The Confirm screen, the fee estimate and UTXO selection all used SendUiState.feeRates, captured when the send flow started. If Blocktank's rates move between review and swipe, the transaction pays a different fee rate from the one the user approved, higher or lower.
Expected
The broadcast uses the fee rates the user saw on Confirm.
Suggested fix
Pass feeRates = _sendUiState.value.feeRates in the wrapper. A unit test in AppViewModelSendFlowTest can check that sendOnChain receives the SendUiState rates and not a fresh getFees() result.
Found while reviewing #1701. That PR's ordinary send uses the selected cached fee test passes through this path but doesn't cover rates changing between review and swipe.
Triage: 3.1.0. The send can pay a different fee rate than Confirm showed, and the fix is one argument plus a unit test, small enough to land before tomorrow's cut.
WalletViewModel.send passes that same value as satsPerVbyte to OnchainSendAttemptService.send, and from there to LightningService.send, on both the regular and the max-amount path (WalletViewModel.swift#L661-L675).
setFeeRate only runs when the user picks a speed or when no rate is set yet.
Activity
ovitrif commentedon Oct 27, 2026
Triage: 3.1.0. The send can pay a different fee rate than Confirm showed, and the fix is one argument plus a unit test, small enough to land before tomorrow's cut.
ovitrif commentedon Oct 27, 2026
iOS has no twin of this gap. Confirm and the send read the same stored rate, and nothing fetches fresh rates at swipe time:
wallet.selectedFeeRateSatsPerVByte(SendConfirmationView.swift#L137-L139).WalletViewModel.sendpasses that same value assatsPerVbytetoOnchainSendAttemptService.send, and from there toLightningService.send, on both the regular and the max-amount path (WalletViewModel.swift#L661-L675).setFeeRateonly runs when the user picks a speed or when no rate is set yet.