Commit bed8dd51 authored by Moody Salem's avatar Moody Salem

fix: do not show price data on non-mainnet

parent 6bcbabec
......@@ -26,15 +26,8 @@ export default function useUSDCPrice(currency?: Currency): Price<Currency, Token
return undefined
}
// return some fake price data for non-mainnet
if (chainId !== 1) {
const fakeUSDC = new Token(chainId, '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 6, 'fUSDC', 'Fake USDC')
return new Price(
currency,
fakeUSDC,
10 ** Math.max(0, currency.decimals - 6),
15 * 10 ** Math.max(6 - currency.decimals, 0)
)
return undefined
}
// handle usdc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment