Open 99linesofcode opened 2 years ago
Results in:
Error: could not parse Fraction
Assuming fetched position data:
With a position.liquidity.toString() value of 341124671496446
position.liquidity.toString()
341124671496446
And the following example code:
const position = await positionManagerContract.positions(db.data?.positions[0].id); console.log(position); const remove = NonfungiblePositionManager.removeCallParameters(position, { tokenId: db.data?.positions[0].id, liquidityPercentage: new Percent(1), slippageTolerance: new Percent(50, 10_000), deadline: (await provider.getBlock('latest')).timestamp + 150, burnToken: false, // true to burn NFT collectOptions: { expectedCurrencyOwed0: CurrencyAmount.fromRawAmount(token0, position.feeGrowthInside0LastX128), expectedCurrencyOwed1: CurrencyAmount.fromRawAmount(token1, position.feeGrowthInside1LastX128), recipient: wallet.address } }); console.log(remove);
It fails here:
Results in:
Assuming fetched position data:![image](https://user-images.githubusercontent.com/3071062/182203119-ab452cb0-32c4-42e7-9fb8-d47ed83e154e.png)
With a
position.liquidity.toString()
value of341124671496446
And the following example code:
It fails here: