1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Use the metamask balanc3 dev price api

Fixes #4056
This commit is contained in:
Dan Finlay 2018-04-23 16:39:08 -07:00
parent 9dd8158b1d
commit a833f02f33

View File

@ -39,7 +39,7 @@ class TokenRatesController {
*/
async fetchExchangeRate (address) {
try {
const response = await fetch(`https://exchanges.balanc3.net/prices?from=${address}&to=ETH&autoConversion=false&summaryOnly=true`)
const response = await fetch(`https://metamask.dev.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) { }