Skip to content

Commit 7d989fb

Browse files
committed
fix token comparator in swapAndAddCallParameters
1 parent 5e1718c commit 7d989fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swapRouter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export abstract class SwapRouter {
402402
}
403403

404404
const chainId = sampleTrade.route.chainId
405-
const zeroForOne = position.pool.token0 === totalAmountSwapped.currency.wrapped
405+
const zeroForOne = position.pool.token0.wrapped.address === totalAmountSwapped.currency.wrapped.address
406406
const { positionAmountIn, positionAmountOut } = SwapRouter.getPositionAmounts(position, zeroForOne)
407407

408408
// if tokens are native they will be converted to WETH9

0 commit comments

Comments
 (0)