Skip to content

Commit a510992

Browse files
committed
fix: remove dupe updateInvoice call on receive confirm screen
1 parent 00c17a9 commit a510992

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

app/src/main/java/to/bitkit/repositories/WalletRepo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class WalletRepo @Inject constructor(
112112
selectedTags = emptyList(),
113113
bip21Description = "",
114114
bip21 = "",
115+
bip21AmountSats = null,
115116
)
116117
}
117118

app/src/main/java/to/bitkit/ui/screens/wallets/receive/EditInvoiceScreen.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ fun EditInvoiceScreen(
139139
}
140140
},
141141
onContinueKeyboard = { keyboardVisible = false },
142-
onContinueGeneral = {
143-
updateInvoice(amountInputUiState.sats.toULong())
144-
editInvoiceVM.onClickContinue()
145-
},
142+
onContinueGeneral = { editInvoiceVM.onClickContinue() },
146143
onClickAddTag = onClickAddTag,
147144
onClickTag = onClickTag,
148145
isSoftKeyboardVisible = isSoftKeyboardVisible

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveConfirmScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import to.bitkit.ui.utils.NotificationUtils
4646
import to.bitkit.ui.utils.withAccent
4747
import to.bitkit.viewmodels.SettingsViewModel
4848

49-
// TODO pass these to nav?
49+
// TODO replace with direct use of the now serializable IcJitEntry
5050
@Serializable
5151
data class CjitEntryDetails(
5252
val networkFeeSat: Long,

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveSheet.kt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,10 @@ fun ReceiveSheet(
180180
amountInputViewModel = editInvoiceAmountViewModel,
181181
walletUiState = walletUiState,
182182
onBack = { navController.popBackStack() },
183-
updateInvoice = { sats ->
184-
wallet.updateBip21Invoice(amountSats = sats)
185-
},
186-
onClickAddTag = {
187-
navController.navigate(ReceiveRoute.AddTag)
188-
},
189-
onClickTag = { tagToRemove ->
190-
wallet.removeTag(tagToRemove)
191-
},
192-
onDescriptionUpdate = { newText ->
193-
wallet.updateBip21Description(newText = newText)
194-
},
183+
updateInvoice = wallet::updateBip21Invoice,
184+
onClickAddTag = { navController.navigate(ReceiveRoute.AddTag) },
185+
onClickTag = wallet::removeTag,
186+
onDescriptionUpdate = wallet::updateBip21Description,
195187
navigateReceiveConfirm = { entry ->
196188
cjitEntryDetails.value = entry
197189
navController.navigate(ReceiveRoute.ConfirmIncreaseInbound)

0 commit comments

Comments
 (0)