mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 10:39:59 +01:00
some sat sugar in market products
This commit is contained in:
parent
7c1a639796
commit
b6f87e5a1e
@ -136,12 +136,11 @@
|
||||
},
|
||||
methods: {
|
||||
async getRates() {
|
||||
let hasFiat = this.stalls.map(s => s.currency).every(c => c != 'sat')
|
||||
if (!hasFiat) return
|
||||
let noFiat = this.stalls.map(s => s.currency).every(c => c == 'sat')
|
||||
if (noFiat) return
|
||||
try {
|
||||
let rates = await axios.get('https://api.opennode.co/v1/rates')
|
||||
this.exchangeRates = rates.data.data
|
||||
console.log(this.exchangeRates)
|
||||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
@ -170,8 +169,6 @@
|
||||
return obj
|
||||
})
|
||||
await this.getRates()
|
||||
|
||||
console.log(this.stalls, this.products)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user