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 @@ -1068,6 +1068,18 @@ class AppViewModel @Inject constructor(
10681068 return
10691069 }
10701070
1071+ // Check if on-chain invoice amount exceeds available balance
1072+ if (invoice.amountSatoshis > 0uL && invoice.amountSatoshis > maxSendOnchain) {
1073+ val shortfall = invoice.amountSatoshis - maxSendOnchain
1074+ toast(
1075+ type = Toast .ToastType .ERROR ,
1076+ title = context.getString(R .string.other__pay_insufficient_savings),
1077+ description = context.getString(R .string.other__pay_insufficient_savings_amount_description)
1078+ .replace(" {amount}" , shortfall.toString()),
1079+ )
1080+ return
1081+ }
1082+
10711083 Logger .info(
10721084 when (invoice.amountSatoshis > 0u ) {
10731085 true -> " Found amount in invoice, proceeding to edit amount"
You can’t perform that action at this time.
0 commit comments