fix lnurl from scan button (#3332)

This commit is contained in:
malik1004x
2026-06-13 11:19:47 +02:00
committed by GitHub
parent d64199e15a
commit 3eaf073120
2 changed files with 20 additions and 15 deletions
@@ -163,17 +163,17 @@ class CoinActionRow extends StatelessWidget {
late final PaymentRequest req;
var unspentCoinType = UnspentCoinType.any;
// if (false && SendViewModelBase.isNonZeroAmountLightningInvoice(code)) {
// unspentCoinType = UnspentCoinType.lightning;
// final amount = CryptoCurrency.btcln.formatAmount(BigInt.from(getBolt11Amount(code) ?? 0));
// req = PaymentRequest(code, amount, "", "", "");
// } else if (false && SendViewModelBase.isLnurlInvoice(code)) {
// unspentCoinType = UnspentCoinType.lightning;
// final amount = CryptoCurrency.btcln.formatAmount(BigInt.from(await LNURL.getPayRequestAmount(code) ?? 0));
// req = PaymentRequest(code, amount, "", "", "");
// } else if (false &&OpenCryptoPayService.isOpenCryptoPayQR(code)) {
// req = PaymentRequest(code, "", "", "", "");
// } else
if (SendViewModelBase.isNonZeroAmountLightningInvoice(code)) {
unspentCoinType = UnspentCoinType.lightning;
final amount = CryptoCurrency.btcln.formatAmount(BigInt.from(getBolt11Amount(code) ?? 0));
req = PaymentRequest(code, amount, "", "", "");
} else if (SendViewModelBase.isLnurlInvoice(code)) {
unspentCoinType = UnspentCoinType.lightning;
final amount = CryptoCurrency.btcln.formatAmount(BigInt.from(await LNURL.getPayRequestAmount(code) ?? 0));
req = PaymentRequest(code, amount, "", "", "");
} else if (OpenCryptoPayService.isOpenCryptoPayQR(code)) {
req = PaymentRequest(code, "", "", "", "");
} else
if (Uri.tryParse(code)?.scheme == "wc") {
if (!isWalletConnectCompatibleChain(walletType)) {
showPopUp<void>(