File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Bitkit/Views/Wallets/Send Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,14 @@ struct SendAmountView: View {
174174 maxSendableAmount = nil
175175 }
176176 }
177+ . onChange ( of: wallet. selectedFeeRateSatsPerVByte) { _ in
178+ // Recalculate max sendable amount when fee rate becomes available or changes
179+ if app. selectedWalletToPayFrom == . onchain {
180+ Task {
181+ await calculateMaxSendableAmount ( )
182+ }
183+ }
184+ }
177185 }
178186
179187 private func onContinue( ) async {
@@ -258,8 +266,8 @@ struct SendAmountView: View {
258266 } catch {
259267 Logger . error ( " Failed to calculate max sendable amount: \( error) " )
260268 await MainActor . run {
261- // Fall back to total balance if calculation fails
262- maxSendableAmount = UInt64 ( wallet . spendableOnchainBalanceSats )
269+ // Keep as nil on error - availableAmount will fall back to total balance
270+ maxSendableAmount = nil
263271 }
264272 }
265273 }
You can’t perform that action at this time.
0 commit comments