aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/invoices.js')
-rw-r--r--lib/invoices.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/invoices.js b/lib/invoices.js
index 5d68d09d..95a81104 100644
--- a/lib/invoices.js
+++ b/lib/invoices.js
@@ -13,7 +13,7 @@ export let generate = async ({ invoice, user, sender, memo }) => {
let { currency, tip, amount, rate, request_id, prompt, type } = invoice;
amount = parseInt(amount || 0);
- tip = parseInt(tip || 0);
+ tip = parseInt(tip) || null;
if (amount < 0) fail("amount out of range");
@@ -54,7 +54,7 @@ export let generate = async ({ invoice, user, sender, memo }) => {
invoice = {
amount,
- created: Date.now(),
+ created: Date.now(),
currency,
hash,
rate,