fix: increase max block age for l2s (#2333)
* fix: increase max block age and refresh fee tier more often * similar for tick data
This commit is contained in:
parent
540ec24e21
commit
f7ac87fa85
@ -11,7 +11,7 @@ import ms from 'ms.macro'
|
||||
import { PoolState, usePool } from './usePools'
|
||||
|
||||
// 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 {
|
||||
isLoading: boolean
|
||||
@ -85,7 +85,7 @@ function usePoolTVL(token0: Token | undefined, token1: Token | undefined) {
|
||||
const { isLoading, isFetching, isUninitialized, isError, data } = useFeeTierDistributionQuery(
|
||||
token0 && token1 ? { token0: token0.address.toLowerCase(), token1: token1.address.toLowerCase() } : skipToken,
|
||||
{
|
||||
pollingInterval: ms`2m`,
|
||||
pollingInterval: ms`30s`,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -31,11 +31,10 @@ export function useAllV3Ticks(
|
||||
const poolAddress =
|
||||
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(
|
||||
poolAddress ? { poolAddress: poolAddress?.toLowerCase(), skip: 0 } : skipToken,
|
||||
{
|
||||
pollingInterval: ms`2m`,
|
||||
pollingInterval: ms`30s`,
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user