Skip to content

Commit

Permalink
bug: fix sqrt_ratio_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixGibson committed Oct 6, 2023
1 parent 6b18424 commit c30f410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/packages/instaswap-core/src/wrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ export class Wrap {
amount: cairo.uint256(BigInt(erc1155AmountIn) * (BigInt(10 ** 18))) // wrap token has 18 decimals
})
}
let isToken1 = (Wrap.ERC20Contract.address > Wrap.WERC20Contract.address) ? true : false;
let sqrt_ratio_limit = (Wrap.ERC20Contract.address > Wrap.WERC20Contract.address) ? MAX_SQRT_RATIO : MIN_SQRT_RATIO;
let isToken1 = !(Wrap.ERC20Contract.address > Wrap.WERC20Contract.address) ? true : false;
let sqrt_ratio_limit = !(Wrap.ERC20Contract.address > Wrap.WERC20Contract.address) ? MAX_SQRT_RATIO : MIN_SQRT_RATIO;
let tmp = {
pool_key: {
token0: sortedTokens[0].address,
Expand Down

0 comments on commit c30f410

Please sign in to comment.