fix: use amount_msat for amountless invoice payments to LNBits

LNBits API expects `amount_msat` (millisatoshis) not `amount` (satoshis)
for amountless invoices, causing a 520 error on cash-in flows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-03-04 09:59:18 -05:00
parent 84e6e81f04
commit c28b6ddea9

View file

@ -178,7 +178,7 @@ async function sendCoins(account, tx) {
const invoiceAmount = decoded.satoshis const invoiceAmount = decoded.satoshis
if (!invoiceAmount || invoiceAmount === 0) { if (!invoiceAmount || invoiceAmount === 0) {
paymentData.amount = parseInt(cryptoAtoms.toString()) paymentData.amount_msat = parseInt(cryptoAtoms.toString()) * 1000
} }
const endpoint = `${account.endpoint}/api/v1/payments` const endpoint = `${account.endpoint}/api/v1/payments`