diff options
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); |
