diff options
| author | Adam Soltys <[email protected]> | 2021-06-29 10:28:58 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-07-07 12:42:19 -0700 |
| commit | 0fb703b85d99c888d1df971e7c3562f7918e0ff8 (patch) | |
| tree | 2f167df25b172c3b7166952444e39e7f582e93c4 /routes/payments.js | |
| parent | 9bf4080d67d6342624c8f1fb543acab00191f730 (diff) | |
| download | coinos-server-0fb703b85d99c888d1df971e7c3562f7918e0ff8.tar.gz coinos-server-0fb703b85d99c888d1df971e7c3562f7918e0ff8.zip | |
add webhooks to invoices
Diffstat (limited to 'routes/payments.js')
| -rw-r--r-- | routes/payments.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js index a52ad395..41dfce26 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -17,6 +17,7 @@ ah(async () => { l.warn("couldn't read exceptions file", e.message); } + try { ( await db.Invoice.findAll({ include: { @@ -28,6 +29,9 @@ ah(async () => { if (address && user) addresses[address] = user.username; if (unconfidential && user) addresses[unconfidential] = user.username; }); + } catch(e) { + console.log(e); + } try { const accounts = await db.Account.findAll({ @@ -51,6 +55,7 @@ ah(async () => { }) ).map((p) => p.hash); + setInterval(async () => { const unconfirmed = ( await db.Payment.findAll({ @@ -129,6 +134,7 @@ ah(async () => { } }, 50); } + /* if (config.liquid) { lq = new BitcoinCore(config.liquid); @@ -151,7 +157,6 @@ ah(async () => { }, 50); } - app.get( "/payments", auth, @@ -194,4 +199,5 @@ ah(async () => { } }) ); +*/ })(); |
