File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -719,6 +719,21 @@ class AppViewModel @Inject constructor(
719719 ?.let { it as ? Scanner .Lightning }
720720 ?.invoice
721721 ?.takeIf { invoice ->
722+ if (invoice.isExpired) {
723+ toast(
724+ type = Toast .ToastType .ERROR ,
725+ title = context.getString(R .string.other__scan_err_decoding),
726+ description = context.getString(R .string.other__scan__error__expired),
727+ )
728+
729+ Logger .debug(
730+ " Lightning invoice expired in unified URI, defaulting to onchain-only" ,
731+ context = TAG
732+ )
733+ return @takeIf false
734+ }
735+
736+ // Then check sending capacity
722737 val canSend = lightningRepo.canSend(invoice.amountSatoshis.coerceAtLeast(1u ))
723738 if (! canSend) {
724739 Logger .debug(" Cannot pay unified invoice using LN, defaulting to onchain-only" , context = TAG )
You can’t perform that action at this time.
0 commit comments