diff --git a/src/components/WalletViewer.tsx b/src/components/WalletViewer.tsx index 1bc49c0..376d129 100644 --- a/src/components/WalletViewer.tsx +++ b/src/components/WalletViewer.tsx @@ -512,15 +512,17 @@ export default function WalletViewer() { } async function handleGenerateInvoice() { - const amount = parseInt(receiveAmount); - if (!amount || amount <= 0) { + const amountSats = parseInt(receiveAmount); + if (!amountSats || amountSats <= 0) { toast.error("Please enter a valid amount"); return; } setGenerating(true); try { - const result = await makeInvoice(amount, { + // Convert sats to millisats for NWC protocol + const amountMillisats = amountSats * 1000; + const result = await makeInvoice(amountMillisats, { description: receiveDescription || undefined, });