Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruv Chauhan authored and Dhruv Chauhan committed Sep 20, 2023
1 parent 70e9e4b commit c08aa7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions subgraphs/uniswap-forks-swap/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ export const MS_PER_YEAR = DAYS_PER_YEAR.times(
);

export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";

export const EXPONENT_MIN = -6143;
export const EXPONENT_MAX = 6144;
10 changes: 6 additions & 4 deletions subgraphs/uniswap-forks-swap/src/common/creators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
BIGDECIMAL_FIFTY_PERCENT,
BIGINT_NEG_ONE,
BIGINT_ZERO,
EXPONENT_MIN,
EXPONENT_MAX,
} from "./constants";
import {
getLiquidityPool,
Expand Down Expand Up @@ -96,10 +98,10 @@ export function createSwap(
const token1 = getOrCreateToken(pool.inputTokens[1]);

if (
token0.decimals < -6143 ||
token0.decimals > 6144 ||
token0.decimals < -6143 ||
token1.decimals > 6144
token0.decimals < EXPONENT_MIN ||
token0.decimals > EXPONENT_MAX ||
token0.decimals < EXPONENT_MIN ||
token1.decimals > EXPONENT_MAX
) {
// If decimals for any of the input tokens are not in range [-6143, 6144]. Ignore it.
// https://github.com/messari/subgraphs/issues/2375
Expand Down

0 comments on commit c08aa7d

Please sign in to comment.