TickMath.getInitializableTickIndex run well when tickIndex is Positive number,However, When tickindex is negative, It return error.
For example:
symbols: WBTC-USDC, tickIndex: -64361, tickSpacing: 60.
after run TickMath.getInitializableTickIndex, it return -64320 which is larger than tickIndex. The correct value should be -64380
TickMath.getInitializableTickIndex
run well whentickIndex
is Positive number,However, Whentickindex
is negative, It return error.For example: symbols: WBTC-USDC, tickIndex: -64361, tickSpacing: 60. after run
TickMath.getInitializableTickIndex
, it return-64320
which is larger thantickIndex
. The correct value should be-64380
Here is the sugguest code