Skip to content

Commit

Permalink
log: gas token decimal diff (Uniswap#611)
Browse files Browse the repository at this point in the history
* 3.35.5

* log: gas token decimal diff

* 3.35.6
  • Loading branch information
jsy1218 authored Jun 14, 2024
1 parent 8dbb487 commit df2a5b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "@uniswap/smart-order-router",
"version": "3.35.3",
"version": "3.35.6",
"description": "Uniswap Smart Order Router",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions src/routers/alpha-router/functions/best-swap-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,12 @@ export async function getBestSwapRouteBy(
);
}

if (decimalsDiff < 0 && chainId === 324) {
log.error(`Decimals diff is negative for ZkSync. This should not happen.
usdTokenDecimals ${usdTokenDecimals} routeWithValidQuote.gasCostInUSD.currency.decimals
${routeWithValidQuote.gasCostInUSD.currency.decimals} ${JSON.stringify(routeWithValidQuote)}`);
}

return CurrencyAmount.fromRawAmount(
usdToken,
JSBI.multiply(
Expand Down

0 comments on commit df2a5b2

Please sign in to comment.