File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ class TransferViewModel @Inject constructor(
140140
141141 blocktankRepo.createOrder(_spendingUiState .value.satsAmount.toULong())
142142 .onSuccess { order ->
143+ settingsStore.update { it.copy(lightningSetupStep = 0 ) }
143144 onOrderCreated(order)
144145 delay(1 .seconds) // Give time to settle the UI
145146 _spendingUiState .update { it.copy(isLoading = false ) }
@@ -194,7 +195,6 @@ class TransferViewModel @Inject constructor(
194195 )
195196 .onSuccess { txId ->
196197 cacheStore.addPaidOrder(orderId = order.id, txId = txId)
197- settingsStore.update { it.copy(lightningSetupStep = 0 ) }
198198 watchOrder(order.id)
199199 }
200200 .onFailure { error ->
@@ -250,7 +250,8 @@ class TransferViewModel @Inject constructor(
250250 return max((fee + maxLspFee).toLong(), Env .TransactionDefaults .dustLimit.toLong())
251251 }
252252
253- private fun onOrderCreated (order : IBtOrder ) {
253+ private suspend fun onOrderCreated (order : IBtOrder ) {
254+ settingsStore.update { it.copy(lightningSetupStep = 0 ) }
254255 _spendingUiState .update { it.copy(order = order, isAdvanced = false , defaultOrder = null ) }
255256 setTransferEffect(TransferEffect .OnOrderCreated )
256257 }
You can’t perform that action at this time.
0 commit comments