File tree Expand file tree Collapse file tree
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -732,7 +732,7 @@ class AppViewModel @Inject constructor(
732732 if (invoice.amountSatoshis > 0uL ) {
733733 val maxSendLightning = walletRepo.balanceState.value.maxSendLightningSats
734734 if (maxSendLightning == 0uL || ! lightningRepo.canSend(invoice.amountSatoshis)) {
735- val shortfall = invoice.amountSatoshis - maxSendLightning
735+ val shortfall = invoice.amountSatoshis.safe() - maxSendLightning.safe()
736736 showAddressValidationError(
737737 titleRes = R .string.other__pay_insufficient_spending,
738738 descriptionRes = R .string.other__pay_insufficient_spending_amount_description,
@@ -1122,7 +1122,7 @@ class AppViewModel @Inject constructor(
11221122
11231123 if (! lightningRepo.canSend(invoice.amountSatoshis)) {
11241124 val maxSendLightning = walletRepo.balanceState.value.maxSendLightningSats
1125- val shortfall = invoice.amountSatoshis - maxSendLightning
1125+ val shortfall = invoice.amountSatoshis.safe() - maxSendLightning.safe()
11261126 toast(
11271127 type = Toast .ToastType .ERROR ,
11281128 title = context.getString(R .string.other__pay_insufficient_spending),
You can’t perform that action at this time.
0 commit comments