From 5cce3e9043fa1898b22276bcbf21701383562877 Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Sun, 12 Jan 2020 00:41:47 +0000 Subject: [PATCH] Added intervals for funding sources without subscriptions --- lnbits/static/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lnbits/static/app.js b/lnbits/static/app.js index bc86e5f..0646f1e 100644 --- a/lnbits/static/app.js +++ b/lnbits/static/app.js @@ -129,11 +129,13 @@ function received() { colorLight: '#ffffff', correctLevel: QRCode.CorrectLevel.M }) + setInterval(function(){ getAjax('/v1/invoice/' + thehash, wallet.inkey, function(datab) { console.log(JSON.parse(datab).PAID) if (JSON.parse(datab).PAID == 'TRUE') { window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user } + })}, 3000); }) } ) @@ -150,11 +152,13 @@ function sendfunds(invoice) { JSON.stringify({payment_request: invoice}), wallet.adminkey, function(data) { + setInterval(function(){ thehash = JSON.parse(data).payment_hash console.log(JSON.parse(data)) if (JSON.parse(data).PAID == 'TRUE') { window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user } + })}, 3000); } ) }