Browse Source

Added intervals

for funding sources without subscriptions
fee_issues
Arc 5 years ago
committed by GitHub
parent
commit
5cce3e9043
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lnbits/static/app.js

4
lnbits/static/app.js

@ -129,11 +129,13 @@ function received() {
colorLight: '#ffffff', colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.M correctLevel: QRCode.CorrectLevel.M
}) })
setInterval(function(){
getAjax('/v1/invoice/' + thehash, wallet.inkey, function(datab) { getAjax('/v1/invoice/' + thehash, wallet.inkey, function(datab) {
console.log(JSON.parse(datab).PAID) console.log(JSON.parse(datab).PAID)
if (JSON.parse(datab).PAID == 'TRUE') { if (JSON.parse(datab).PAID == 'TRUE') {
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
} }
})}, 3000);
}) })
} }
) )
@ -150,11 +152,13 @@ function sendfunds(invoice) {
JSON.stringify({payment_request: invoice}), JSON.stringify({payment_request: invoice}),
wallet.adminkey, wallet.adminkey,
function(data) { function(data) {
setInterval(function(){
thehash = JSON.parse(data).payment_hash thehash = JSON.parse(data).payment_hash
console.log(JSON.parse(data)) console.log(JSON.parse(data))
if (JSON.parse(data).PAID == 'TRUE') { if (JSON.parse(data).PAID == 'TRUE') {
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
} }
})}, 3000);
} }
) )
} }

Loading…
Cancel
Save