1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

Merge pull request #4069 from MetaMask/i4056-LatestPriceApi

Use latest balanc3 api for prices
This commit is contained in:
Dan Finlay 2018-04-25 10:42:03 -07:00 committed by GitHub
commit f6653b9f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ class TokenRatesController {
*/
async fetchExchangeRate (address) {
try {
const response = await fetch(`https://metamask.dev.balanc3.net/prices?from=${address}&to=ETH&autoConversion=false&summaryOnly=true`)
const response = await fetch(`https://metamask.balanc3.net/prices?from=${address}&to=ETH&autoConversion=false&summaryOnly=true`)
const json = await response.json()
return json && json.length ? json[0].averagePrice : 0
} catch (error) { }