launch price check on start
This commit is contained in:
parent
ddeb3fa9b2
commit
9b1430a119
1 changed files with 21 additions and 16 deletions
|
|
@ -124,13 +124,8 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
animation1: function () {
|
getPrice: function () {
|
||||||
self = this
|
self = this
|
||||||
setTimeout(function () {
|
|
||||||
setInterval(function () {
|
|
||||||
self.connection.send('')
|
|
||||||
self.counter++
|
|
||||||
if (self.counter % 20 === 0) {
|
|
||||||
if ('{{ copilot.show_price }}' != 'None') {
|
if ('{{ copilot.show_price }}' != 'None') {
|
||||||
LNbits.api
|
LNbits.api
|
||||||
.request('GET', 'https://api.opennode.com/v1/rates', 'filla')
|
.request('GET', 'https://api.opennode.com/v1/rates', 'filla')
|
||||||
|
|
@ -147,6 +142,16 @@
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
animation1: function () {
|
||||||
|
self = this
|
||||||
|
self.getPrice
|
||||||
|
setTimeout(function () {
|
||||||
|
setInterval(function () {
|
||||||
|
self.connection.send('')
|
||||||
|
self.counter++
|
||||||
|
if (self.counter % 20 === 0) {
|
||||||
|
self.getPrice
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue