diff options
| author | Adam Soltys <[email protected]> | 2023-05-25 23:35:57 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-25 23:35:57 -0700 |
| commit | 3cb02fa61df056da7f7dd2312c538381150bd763 (patch) | |
| tree | 66258b3b4f7b9510169bc5988bab7842ddce6591 /lib | |
| parent | 07520c066d48bbfe32c3de640d09bd9400417992 (diff) | |
| download | coinos-server-3cb02fa61df056da7f7dd2312c538381150bd763.tar.gz coinos-server-3cb02fa61df056da7f7dd2312c538381150bd763.zip | |
fix amount received
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lightning.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/lightning.js b/lib/lightning.js index 7ef62cc9..a44e0da8 100644 --- a/lib/lightning.js +++ b/lib/lightning.js @@ -9,19 +9,20 @@ import { credit, types } from "$lib/payments"; export async function listenForLightning() { let event = await ln.waitanyinvoice(await g("pay_index")); + console.log("EVENT", event); let { payment_hash: hash, bolt11, pay_index, status, - msatoshi_received, + amount_received_msat, payment_preimage: preimage } = event; await s("pay_index", pay_index); setTimeout(listenForLightning); - let received = Math.round(msatoshi_received / 1000); + let received = Math.round(amount_received_msat / 1000); try { l("incoming lightning payment", received); |
