Skip to content

Commit 9712710

Browse files
committed
chore: lint
1 parent 8cd2eb6 commit 9712710

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/to/bitkit/ui/sheets/BoostTransactionViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class BoostTransactionViewModel @Inject constructor(
4545
const val MAX_FEE_PERCENTAGE = 0.5
4646
const val MAX_FEE_RATE = 100UL
4747
const val FEE_RATE_STEP = 1UL
48+
const val RBF_MIN_INCREASE = 2UL
4849
}
4950

5051
// State variables
@@ -86,7 +87,7 @@ class BoostTransactionViewModel @Inject constructor(
8687
val feeRateResult = when (activityContent.txType) {
8788
PaymentType.SENT -> {
8889
// For RBF, use at least the original fee rate + 2 sat/vbyte, with a minimum of 2 sat/vbyte
89-
minFeeRate = (activityContent.feeRate + 2U).coerceAtLeast(2U)
90+
minFeeRate = (activityContent.feeRate + RBF_MIN_INCREASE).coerceAtLeast(RBF_MIN_INCREASE)
9091
lightningRepo.getFeeRateForSpeed(speed = TransactionSpeed.Fast)
9192
}
9293

@@ -96,7 +97,6 @@ class BoostTransactionViewModel @Inject constructor(
9697
val sortedUtxos = lightningRepo.listSpendableOutputs()
9798
.getOrDefault(emptyList())
9899
.sortedByDescending { it.valueSats }
99-
.takeIf { it.isNotEmpty() }
100100

101101
val totalFeeResult = lightningRepo.calculateTotalFee(
102102
amountSats = activityContent.value,

0 commit comments

Comments
 (0)