diff options
| author | Adam Soltys <[email protected]> | 2023-11-30 15:34:45 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-30 15:34:45 -0800 |
| commit | a7322928c45848cfb9984454bf8ece6e3439c673 (patch) | |
| tree | 9b1031c31ee1f8160306ac66749afe0802f8aa54 /lib/payments.js | |
| parent | acb93f29e83b35c0917d88ebbc62812e2dff989f (diff) | |
| download | coinos-server-a7322928c45848cfb9984454bf8ece6e3439c673.tar.gz coinos-server-a7322928c45848cfb9984454bf8ece6e3439c673.zip | |
zaps and emails
Diffstat (limited to 'lib/payments.js')
| -rw-r--r-- | lib/payments.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/payments.js b/lib/payments.js index 9f32f8fb..f2fab1ba 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -113,9 +113,12 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { if (iid && iid.hash) iid = iid.hash; let invoice = await g(`invoice:${iid}`); - if (!invoice) return warn("failed to credit", hash, ", invoice not found"); + if (!invoice) { + await db.sAdd("missing", hash); + return; + } - let { tip } = invoice; + let { tip } = invoice; tip = parseInt(tip) || 0; if (!memo) ({ memo } = invoice); |
