Commit f7ac87fa authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

fix: increase max block age for l2s (#2333)

* fix: increase max block age and refresh fee tier more often

* similar for tick data
parent 540ec24e
...@@ -11,7 +11,7 @@ import ms from 'ms.macro' ...@@ -11,7 +11,7 @@ import ms from 'ms.macro'
import { PoolState, usePool } from './usePools' import { PoolState, usePool } from './usePools'
// maximum number of blocks past which we consider the data stale // maximum number of blocks past which we consider the data stale
const MAX_DATA_BLOCK_AGE = 10 const MAX_DATA_BLOCK_AGE = 20
interface FeeTierDistribution { interface FeeTierDistribution {
isLoading: boolean isLoading: boolean
...@@ -85,7 +85,7 @@ function usePoolTVL(token0: Token | undefined, token1: Token | undefined) { ...@@ -85,7 +85,7 @@ function usePoolTVL(token0: Token | undefined, token1: Token | undefined) {
const { isLoading, isFetching, isUninitialized, isError, data } = useFeeTierDistributionQuery( const { isLoading, isFetching, isUninitialized, isError, data } = useFeeTierDistributionQuery(
token0 && token1 ? { token0: token0.address.toLowerCase(), token1: token1.address.toLowerCase() } : skipToken, token0 && token1 ? { token0: token0.address.toLowerCase(), token1: token1.address.toLowerCase() } : skipToken,
{ {
pollingInterval: ms`2m`, pollingInterval: ms`30s`,
} }
) )
......
...@@ -31,11 +31,10 @@ export function useAllV3Ticks( ...@@ -31,11 +31,10 @@ export function useAllV3Ticks(
const poolAddress = const poolAddress =
currencyA && currencyB && feeAmount ? Pool.getAddress(currencyA?.wrapped, currencyB?.wrapped, feeAmount) : undefined currencyA && currencyB && feeAmount ? Pool.getAddress(currencyA?.wrapped, currencyB?.wrapped, feeAmount) : undefined
//TODO(judo): determine if pagination is necessary for this query
const { isLoading, isError, error, isUninitialized, data } = useAllV3TicksQuery( const { isLoading, isError, error, isUninitialized, data } = useAllV3TicksQuery(
poolAddress ? { poolAddress: poolAddress?.toLowerCase(), skip: 0 } : skipToken, poolAddress ? { poolAddress: poolAddress?.toLowerCase(), skip: 0 } : skipToken,
{ {
pollingInterval: ms`2m`, pollingInterval: ms`30s`,
} }
) )
......
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