some sat sugar in market products
This commit is contained in:
parent
7c1a639796
commit
b6f87e5a1e
1 changed files with 2 additions and 5 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue