Skip to content

Commit 7349a0c

Browse files
committed
fix: setup was being called more than once
1 parent 792ad59 commit 7349a0c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fun BoostTransactionSheet(
6969
val haptic = LocalHapticFeedback.current
7070

7171
// Setup activity when component is first created
72-
LaunchedEffect(item) {
72+
LaunchedEffect(Unit) {
7373
viewModel.setupActivity(item)
7474
}
7575

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ class BoostTransactionViewModel @Inject constructor(
120120
totalFee = totalFeeSatsRecommended,
121121
feeRate = feeRateRecommended
122122
)
123+
124+
if (_uiState.value.totalFeeSats >= maxTotalFee) {
125+
setBoostTransactionEffect(BoostTransactionEffects.OnMaxFee)
126+
}
123127
}
124128

125129
else -> {
@@ -147,10 +151,6 @@ class BoostTransactionViewModel @Inject constructor(
147151
loading = false,
148152
)
149153
}
150-
151-
if (totalFee >= maxTotalFee) {
152-
setBoostTransactionEffect(BoostTransactionEffects.OnMaxFee)
153-
}
154154
}
155155

156156
fun onClickEdit() {

0 commit comments

Comments
 (0)