mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 08:47:23 +00:00
ln decoder for qr code scan and mobile qr modal fix
This commit is contained in:
1 parent
fde64074ed
commit
0925bb9f1c
3 files changed
+35
-21
No files matched your search
@@ -12,6 +12,7 @@ import { useWalletTransactions } from '@/hooks/cashu/useWalletTransactions';
|
||||
import { useHistoryManager } from '@/hooks/cashu/useHistoryManager';
|
||||
import { useBitcoinBalance, useBitcoinTransactionHistory, useBitcoinOperations } from '@/hooks/useBitcoinBalance';
|
||||
import { useNsecAccess } from '@/hooks/useNsecAccess';
|
||||
import { decodeBolt11Amount } from '@/lib/bolt11Decoder';
|
||||
import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
|
||||
import { QRModal } from '@/components/ui/qr-modal';
|
||||
import { WalletHeader } from './WalletHeader';
|
||||
@@ -367,11 +368,12 @@ export function CashuWallet() {
|
||||
setLightningInvoice(result.value);
|
||||
setPendingInvoice(result.value);
|
||||
// Decode invoice amount
|
||||
setDecodedInvoiceAmount(100); // Placeholder - would need actual decoding
|
||||
const amount = decodeBolt11Amount(result.value);
|
||||
setDecodedInvoiceAmount(amount);
|
||||
setShowSendModal(true);
|
||||
toast({
|
||||
title: "Lightning Invoice Scanned",
|
||||
description: "Invoice ready to pay",
|
||||
description: amount ? `${amount} sats` : "Invoice ready to pay",
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user