diff --git a/src/components/WalletViewer.tsx b/src/components/WalletViewer.tsx index a85d86e..1bc49c0 100644 --- a/src/components/WalletViewer.tsx +++ b/src/components/WalletViewer.tsx @@ -366,7 +366,7 @@ export default function WalletViewer() { try { setSending(true); - const amountSats = parseInt(sendAmount) / 1000; // Convert from millisats + const amountSats = parseInt(sendAmount); // Amount is in sats const invoice = await resolveLightningAddress(input, amountSats); // Update the invoice field with the resolved invoice @@ -488,7 +488,8 @@ export default function WalletViewer() { async function handleSendPayment() { setSending(true); try { - const amount = sendAmount ? parseInt(sendAmount) : undefined; + // Convert sats to millisats for NWC protocol + const amount = sendAmount ? parseInt(sendAmount) * 1000 : undefined; await payInvoice(sendInvoice, amount); toast.success("Payment sent successfully"); resetSendDialog(); @@ -1045,7 +1046,7 @@ export default function WalletViewer() {
Amount: - {Math.floor( - parseInt(sendAmount) / 1000, - ).toLocaleString()}{" "} - sats + {parseInt(sendAmount).toLocaleString()} sats
)} @@ -1249,10 +1247,10 @@ export default function WalletViewer() { Invoice (tap to view)
-
{generatedInvoice}
+ {generatedInvoice}