aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-02-21 22:41:27 -0800
committerAdam Soltys <[email protected]>2024-02-21 22:41:27 -0800
commit187febfe9d2525d8e9b3436225267f0f0b0d509b (patch)
tree82edfcb3185333f945fc33228c143181f4f9a0ad
parent84c9a28988725946745b8d42ecf8621070cab1b8 (diff)
downloadcoinos-server-187febfe9d2525d8e9b3436225267f0f0b0d509b.tar.gz
coinos-server-187febfe9d2525d8e9b3436225267f0f0b0d509b.zip
invoice items
-rw-r--r--lib/invoices.js2
-rw-r--r--lib/payments.js5
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;