From 187febfe9d2525d8e9b3436225267f0f0b0d509b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 21 Feb 2024 22:41:27 -0800 Subject: invoice items --- lib/invoices.js | 2 ++ lib/payments.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/invoices.js b/lib/invoices.js index 8ac8a868..85b03224 100644 --- a/lib/invoices.js +++ b/lib/invoices.js @@ -17,6 +17,7 @@ export let generate = async ({ invoice, user, sender, memo }) => { fiat, tip, amount, + items = [], rate, request_id, prompt, @@ -70,6 +71,7 @@ export let generate = async ({ invoice, user, sender, memo }) => { currency, hash, id, + items, memo, rate, pending: 0, diff --git a/lib/payments.js b/lib/payments.js index a4063e76..1d69c5b6 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -37,7 +37,8 @@ export let debit = async ({ rate, }) => { if (await g("freeze")) fail("Problem sending payment"); - if (!user.unlimited && amount > 1000000) fail(`⚡️${amount} exceeds max withdrawal of ⚡️1,000,000`); + if (!user.unlimited && amount > 1000000) + fail(`⚡️${amount} exceeds max withdrawal of ⚡️1,000,000`); let ref; let { id: uid, currency, username } = user; if (!rate) rate = store.rates[currency]; @@ -520,7 +521,7 @@ export let build = async ({ amount, address, feeRate, user, subtract }) => { feeRate = fees.halfHourFee; } - if (feeRate < fees.economyFee) fail("fee rate too low"); + if (feeRate < fees.economyFee) fail("fee rate too low"); let replaceable = true; -- cgit v1.2.3