undo april fools
This commit is contained in:
parent
9cbc895e29
commit
d08d593f69
|
@ -11,14 +11,13 @@ async function getPrice (fiat) {
|
|||
}
|
||||
}
|
||||
const url = `https://api.coinbase.com/v2/prices/BTC-${fiat}/spot`
|
||||
let price = await fetch(url)
|
||||
const price = await fetch(url)
|
||||
.then((res) => res.json())
|
||||
.then((body) => parseFloat(body.data.amount))
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
return -1
|
||||
})
|
||||
price *= 34
|
||||
cache.set(fiat, { price, createdAt: Date.now() })
|
||||
return price
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue