Skip to content

Commit

Permalink
fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
moodysalem committed May 11, 2021
1 parent 6c4242f commit 8035baf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/entities/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export class Position {
*/
public mintAmountsWithSlippage(slippageTolerance: Percent): Readonly<{ amount0: JSBI; amount1: JSBI }> {
// get lower/upper prices
const priceLower = this.pool.token0Price.raw.multiply(new Percent(1).subtract(slippageTolerance))
const priceUpper = this.pool.token0Price.raw.multiply(slippageTolerance.add(1))
const priceLower = this.pool.token0Price.asFraction.multiply(new Percent(1).subtract(slippageTolerance))
const priceUpper = this.pool.token0Price.asFraction.multiply(slippageTolerance.add(1))
const sqrtRatioX96Lower = encodeSqrtRatioX96(priceLower.numerator, priceLower.denominator)
const sqrtRatioX96Upper = encodeSqrtRatioX96(priceUpper.numerator, priceUpper.denominator)

Expand Down
6 changes: 3 additions & 3 deletions src/nonfungiblePositionManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ describe('NonfungiblePositionManager', () => {
slippageTolerance,
deadline,
collectOptions: {
expectedCurrencyOwed0: new CurrencyAmount(token0, 0),
expectedCurrencyOwed1: new CurrencyAmount(token1, 0),
expectedCurrencyOwed0: CurrencyAmount.fromRawAmount(token0, 0),
expectedCurrencyOwed1: CurrencyAmount.fromRawAmount(token1, 0),
recipient
}
}
Expand Down Expand Up @@ -307,7 +307,7 @@ describe('NonfungiblePositionManager', () => {

it('works for partial with eth', () => {
const ethAmount = CurrencyAmount.ether(0)
const tokenAmount = new CurrencyAmount(token1, 0)
const tokenAmount = CurrencyAmount.fromRawAmount(token1, 0)

const { calldata, value } = NonfungiblePositionManager.removeCallParameters(
new Position({
Expand Down

0 comments on commit 8035baf

Please sign in to comment.