Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable v4 cached routes set caching #984

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class DynamoRouteCachingProvider extends IRouteCachingProvider {
const { currencyIn, currencyOut } = this.determineCurrencyInOut(amount, quoteCurrency, tradeType)

// for getting the cached routes, we dont know if the cached route will contains a v4 pool or not, so we try to see if the input protocols contain v4
const includesV4Pool = protocols.includes(Protocol.V4)
const includesV4Pool = false // TODO: re-enable v4 protocols.includes(Protocol.V4)

const partitionKey = new PairTradeTypeChainId({
currencyIn: PairTradeTypeChainId.deriveCurrencyAddress(includesV4Pool, currencyIn),
Expand Down Expand Up @@ -338,7 +338,7 @@ export class DynamoRouteCachingProvider extends IRouteCachingProvider {
// if no Item is found it means we need to send a caching request
if (shouldSendCachingRequest) {
metric.putMetric('CachingQuoteForRoutesDbRequestSent', 1, MetricLoggerUnit.Count)
this.sendAsyncCachingRequest(partitionKey, [Protocol.V2, Protocol.V3, Protocol.V4, Protocol.MIXED], amount)
this.sendAsyncCachingRequest(partitionKey, [Protocol.V2, Protocol.V3, Protocol.MIXED], amount)
this.setRoutesDbCachingIntentFlag(partitionKey, amount, currentBlockNumber)
} else {
metric.putMetric('CachingQuoteForRoutesDbRequestNotNeeded', 1, MetricLoggerUnit.Count)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('DynamoRouteCachingProvider', async () => {
sinon.assert.called(spy)
})

it('Caches routes properly for a token pair that has its cache configured to Livemode', async () => {
it.skip('Caches routes properly for a token pair that has its cache configured to Livemode', async () => {
const currencyAmount = CurrencyAmount.fromRawAmount(WETH, JSBI.BigInt(1 * 10 ** WETH.decimals))
const currencyAmountETH = CurrencyAmount.fromRawAmount(
nativeOnChain(ChainId.MAINNET),
Expand Down