mirror of
https://github.com/lnbits/lnbits.git
synced 2025-03-26 17:51:53 +01:00
Added intervals
for funding sources without subscriptions
This commit is contained in:
parent
d3bc33df51
commit
5cce3e9043
@ -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);
|
||||
}
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user