some sat sugar in market products
This commit is contained in:
@@ -136,12 +136,11 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getRates() {
|
async getRates() {
|
||||||
let hasFiat = this.stalls.map(s => s.currency).every(c => c != 'sat')
|
let noFiat = this.stalls.map(s => s.currency).every(c => c == 'sat')
|
||||||
if (!hasFiat) return
|
if (noFiat) return
|
||||||
try {
|
try {
|
||||||
let rates = await axios.get('https://api.opennode.co/v1/rates')
|
let rates = await axios.get('https://api.opennode.co/v1/rates')
|
||||||
this.exchangeRates = rates.data.data
|
this.exchangeRates = rates.data.data
|
||||||
console.log(this.exchangeRates)
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
}
|
}
|
||||||
@@ -170,8 +169,6 @@
|
|||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
await this.getRates()
|
await this.getRates()
|
||||||
|
|
||||||
console.log(this.stalls, this.products)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user