Commit 13d3e75a authored by Tina's avatar Tina Committed by GitHub

fix: Eth price fetch cache miss and use default fetch policy to remove extra...

fix: Eth price fetch cache miss and use default fetch policy to remove extra network requests (#6157)
parent 8c55c70a
import gql from 'graphql-tag'
gql`
query TokenSpotPrice($chain: Chain!, $address: String) {
query TokenSpotPrice($chain: Chain!, $address: String = null) {
token(chain: $chain, address: $address) {
id
address
......
......@@ -63,6 +63,7 @@ export function useUSDPrice(currencyAmount?: CurrencyAmount<Currency>): {
skip: !chain || !isGqlSupportedChain(currency?.chainId),
pollInterval: PollingInterval.Normal,
notifyOnNetworkStatusChange: true,
fetchPolicy: 'cache-first',
})
// Use USDC price for chains not supported by backend yet
......
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