diff --git a/packages/swap-router/src/swap-simulator/utility/tick.util.ts b/packages/swap-router/src/swap-simulator/utility/tick.util.ts index 4d9bf8ed7..01d1fc86a 100644 --- a/packages/swap-router/src/swap-simulator/utility/tick.util.ts +++ b/packages/swap-router/src/swap-simulator/utility/tick.util.ts @@ -102,7 +102,7 @@ export function nextInitializedTickWithinOneWord( if (isTickToLeft) { const { wordPos, bitPos } = tickBitmapPosition(compressed); const mask = (1n << BigInt(bitPos)) - 1n + (1n << BigInt(bitPos)); - const bitmap = BigInt(tickBitmaps[wordPos] || 0n); + const bitmap = BigInt(Number(tickBitmaps[wordPos]) || 0n); const masked = bitmap & mask; const initialized = masked !== 0n; @@ -114,7 +114,7 @@ export function nextInitializedTickWithinOneWord( const { wordPos, bitPos } = tickBitmapPosition(compressed + 1); const mask = ~((1n << BigInt(bitPos)) - 1n); - const bitmap = BigInt(tickBitmaps[wordPos] || 0n); + const bitmap = BigInt(Number(tickBitmaps[wordPos]) || 0n); const masked = bitmap & mask; const initialized = masked !== 0n;