Skip to content
Open
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 @@ -203,6 +203,21 @@ export class DynamoRouteCachingProvider extends IRouteCachingProvider {
alphaRouterConfig,
swapOptions
)
} else if (currencyIn.isNative || currencyOut.isNative) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably work

// Caching requests are not `optimistic`, we need to be careful of not removing this flag
// This condition is protecting us against firing another caching request from inside a caching request
if (optimistic) {
// We send an async caching quote
// we do not await on this function, it's a fire and forget
this.maybeSendCachingQuoteForRoutesDb(
partitionKey,
amount,
currentBlockNumber,
[], // sending cachedRoutesRouteIds are really just for the debugging/logging purposes, async call does not use cachedRoutesRouteIds at all
alphaRouterConfig,
swapOptions
)
}
} else {
metric.putMetric('RoutesDbEntriesNotFound', 1, MetricLoggerUnit.Count)
log.warn(`[DynamoRouteCachingProvider] No items found in the query response for ${partitionKey.toString()}`)
Expand Down
31 changes: 15 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^2.1.0",
"@uniswap/sdk-core": "^7.8.0",
"@uniswap/smart-order-router": "4.22.30",
"@uniswap/smart-order-router": "4.22.31",
"@uniswap/smart-wallet-sdk": "^2.1.1",
"@uniswap/token-lists": "^1.0.0-beta.33",
"@uniswap/universal-router-sdk": "^4.21.0",
Expand Down
Loading