aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-07-19 22:55:10 -0700
committerAdam Soltys <[email protected]>2025-07-19 22:55:10 -0700
commit59fe8d2e24085239b15ca282c182d5c7cd1ce4de (patch)
treebaddfa93846a775e93f9253ef36ac63a4dfabc3e /lib
parentd7290476c1722b1f6d8de4cec11c75e979e893eb (diff)
downloadcoinos-server-59fe8d2e24085239b15ca282c182d5c7cd1ce4de.tar.gz
coinos-server-59fe8d2e24085239b15ca282c182d5c7cd1ce4de.zip
respect null tips
Diffstat (limited to 'lib')
-rw-r--r--lib/invoices.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts
index d624ac6b..1e08140a 100644
--- a/lib/invoices.ts
+++ b/lib/invoices.ts
@@ -35,7 +35,7 @@ export const generate = async ({ invoice, user }) => {
} = invoice;
amount = parseInt(amount || 0);
- tip = parseInt(tip) || null;
+ tip = tip == null ? null : parseInt(tip);
if (user) user = await getUser(user.username);
if (!user) fail("user not provided");