We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0764bb0 commit 0ead374Copy full SHA for 0ead374
app/src/main/java/to/bitkit/ui/screens/wallets/activity/BoostTransactionViewModel.kt
@@ -81,9 +81,13 @@ class BoostTransactionViewModel @Inject constructor(
81
PaymentType.RECEIVED -> lightningRepo.calculateCpfpFeeRate(activityContent.txId)
82
}
83
84
- // TODO ideally include utxos for a better fee estimate
+ val sortedUtxos = lightningRepo.listSpendableOutputs()
85
+ .getOrDefault(emptyList())
86
+ .sortedByDescending { it.valueSats }
87
+
88
val totalFeeResult = lightningRepo.calculateTotalFee(
89
amountSats = activityContent.value,
90
+ utxosToSpend = sortedUtxos,
91
speed = TransactionSpeed.Custom(feeRateResult.getOrDefault(0u).toUInt()),
92
)
93
0 commit comments