mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use latest balanc3 api for prices
This commit is contained in:
parent
a833f02f33
commit
7ec775d614
@ -39,7 +39,7 @@ class TokenRatesController {
|
|||||||
*/
|
*/
|
||||||
async fetchExchangeRate (address) {
|
async fetchExchangeRate (address) {
|
||||||
try {
|
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()
|
const json = await response.json()
|
||||||
return json && json.length ? json[0].averagePrice : 0
|
return json && json.length ? json[0].averagePrice : 0
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
|
Loading…
Reference in New Issue
Block a user