diff options
| author | Adam Soltys <[email protected]> | 2023-12-01 11:36:35 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-01 11:36:35 -0800 |
| commit | 7709c1efde9a1f3078171ee56985cd25511d6f7b (patch) | |
| tree | cd996eaaa860cdb3d7da688e0ad4c5ec7bae1a0c /routes/payments.js | |
| parent | 826c7b361c93905c4725755038d398221530051d (diff) | |
| download | coinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.tar.gz coinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.zip | |
biome formatter
Diffstat (limited to 'routes/payments.js')
| -rw-r--r-- | routes/payments.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/routes/payments.js b/routes/payments.js index 84fe4e61..9df9abb6 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -21,7 +21,7 @@ let catchUp = async () => { try { if (seen.includes(txid)) continue; await got.post(`http://localhost:${process.env.PORT || 3119}/bitcoin`, { - json: { txid, wallet: config.bitcoin.wallet }, + json: { txid, wallet: config.bitcoin.wallet } }); seen.push(txid); @@ -57,7 +57,7 @@ export default { await got .post(`${config.classic}/admin/credit`, { json: { username, amount, source }, - headers: { authorization: `Bearer ${config.admin}` }, + headers: { authorization: `Bearer ${config.admin}` } }) .json(); } else if (payreq) { @@ -119,8 +119,8 @@ export default { (((b.amount || 0) + (b.tip || 0) - (b.fee || 0) - (b.ourfee || 0)) * b.rate) / SATS - ).toFixed(2), - }, + ).toFixed(2) + } }), {} ); @@ -181,7 +181,7 @@ export default { k1: name, defaultDescription: `Withdraw from coinos fund ${name}`, minWithdrawable: 0, - maxWithdrawable, + maxWithdrawable }); }, @@ -204,7 +204,7 @@ export default { hash: iid, rate: store.rates[currency], uid: user.id, - received: 0, + received: 0 }); } @@ -272,7 +272,7 @@ export default { let tx = await bc.fundRawTransaction(raw, { feeRate, subtractFeeFromOutputs, - replaceable, + replaceable }); let fee = sats(tx.fee); @@ -315,7 +315,7 @@ export default { for (let { scriptPubKey: { address }, - value, + value } of tx.vout) { total += sats(value); let iid = await g(`invoice:${address}`); @@ -348,13 +348,13 @@ export default { "card[number]": number, "card[exp_month]": month, "card[exp_year]": year, - "card[cvc]": cvc, + "card[cvc]": cvc }; let { id: source } = await got .post(`${stripe}/tokens`, { form, - username, + username }) .json(); @@ -363,13 +363,13 @@ export default { amount, currency, source, - description: "starter coupon", + description: "starter coupon" }; let r = await got .post(`${stripe}/charges`, { form, - username, + username }) .json(); @@ -382,7 +382,7 @@ export default { id, hash: id, uid: user.id, - received: 0, + received: 0 }); amount = sats(amount / store.rates[currency]); let uid = await g("user:coinos"); @@ -402,7 +402,7 @@ export default { "estimatesmartfee", "echo", "getblockchaininfo", - "getnetworkinfo", + "getnetworkinfo" ]; if (!whitelist.includes(method)) fail("unsupported method"); @@ -535,5 +535,5 @@ export default { console.log(e); bail(res, e.message); } - }, + } }; |
