diff options
| author | Adam Soltys <[email protected]> | 2022-09-02 15:06:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-02 15:06:43 -0700 |
| commit | d1cc66d1a02b75f90fbf0c05910777c76228259a (patch) | |
| tree | 7b93dc6a2fc0ec9d03676d6b4093fedf9733f128 /routes/lightning/receive.js | |
| parent | 3161dd7ee95b6c7d70f8341298dd4fab84cda8b0 (diff) | |
| download | coinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.tar.gz coinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.zip | |
es6 migration
Diffstat (limited to 'routes/lightning/receive.js')
| -rw-r--r-- | routes/lightning/receive.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 405eed38..e35d91ec 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -4,7 +4,7 @@ import { computeConversionFee } from './conversionFee.js'; import { sendLiquid } from "../liquid/send.js"; const handlePayment = async (msg) => { - l.info("incoming lightning payment", msg.value, msg.payment_request, msg.settled); + l("incoming lightning payment", msg.value, msg.payment_request, msg.settled); if (!msg.settled) return; let account, total, user; @@ -15,7 +15,7 @@ const handlePayment = async (msg) => { }); if (!invoice) - return l.warn("received lightning with no invoice", msg.payment_request); + return warn("received lightning with no invoice", msg.payment_request); try { await db.transaction(async (transaction) => { @@ -85,7 +85,7 @@ const handlePayment = async (msg) => { emit(user.username, "account", payment.account); notify(user, `Received ${total} SAT`); - l.info( + l( "lightning payment received", user.username, payment.amount, @@ -95,7 +95,7 @@ const handlePayment = async (msg) => { let c = convert[msg.payment_request]; if (msg.payment_request && c) { - l.info( + l( "lightning detected for conversion request", msg.payment_request, c.address, @@ -112,11 +112,11 @@ const handlePayment = async (msg) => { limit: total, }); } catch (e) { - l.error("problem sending liquid payment", e.message, e.stack); + err("problem sending liquid payment", e.message, e.stack); } } } catch (e) { - l.error("problem receiving lightning payment", e.message); + err("problem receiving lightning payment", e.message); } }; |
