launch price check on start
This commit is contained in:
@@ -124,13 +124,8 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
animation1: function () {
|
||||
getPrice: function () {
|
||||
self = this
|
||||
setTimeout(function () {
|
||||
setInterval(function () {
|
||||
self.connection.send('')
|
||||
self.counter++
|
||||
if (self.counter % 20 === 0) {
|
||||
if ('{{ copilot.show_price }}' != 'None') {
|
||||
LNbits.api
|
||||
.request('GET', 'https://api.opennode.com/v1/rates', 'filla')
|
||||
@@ -147,6 +142,16 @@
|
||||
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)
|
||||
}, 2000)
|
||||
|
||||
Reference in New Issue
Block a user