Commit e86946b1 authored by Noah Zinsmeister's avatar Noah Zinsmeister

bump to sdk version that fixes mint slippage bug

closes #1573
parent ae27e245
...@@ -208,6 +208,7 @@ function V2PairMigration({ ...@@ -208,6 +208,7 @@ function V2PairMigration({
tickUpper, tickUpper,
amount0: token0Value.quotient, amount0: token0Value.quotient,
amount1: token1Value.quotient, amount1: token1Value.quotient,
useFullPrecision: false, // we don't want full precision as this is used to calculate slippage amounts
}) })
: undefined : undefined
......
...@@ -286,6 +286,7 @@ export function useV3DerivedMintInfo( ...@@ -286,6 +286,7 @@ export function useV3DerivedMintInfo(
tickLower, tickLower,
tickUpper, tickUpper,
amount0: independentAmount.quotient, amount0: independentAmount.quotient,
useFullPrecision: true, // we want full precision for the theoretical position
}) })
: Position.fromAmount1({ : Position.fromAmount1({
pool: poolForPosition, pool: poolForPosition,
...@@ -356,7 +357,7 @@ export function useV3DerivedMintInfo( ...@@ -356,7 +357,7 @@ export function useV3DerivedMintInfo(
return undefined return undefined
} }
// mark as 0 if disbaled because out of range // mark as 0 if disabled because out of range
const amount0 = !deposit0Disabled const amount0 = !deposit0Disabled
? parsedAmounts?.[tokenA.equals(poolForPosition.token0) ? Field.CURRENCY_A : Field.CURRENCY_B]?.quotient ? parsedAmounts?.[tokenA.equals(poolForPosition.token0) ? Field.CURRENCY_A : Field.CURRENCY_B]?.quotient
: BIG_INT_ZERO : BIG_INT_ZERO
...@@ -371,6 +372,7 @@ export function useV3DerivedMintInfo( ...@@ -371,6 +372,7 @@ export function useV3DerivedMintInfo(
tickUpper, tickUpper,
amount0, amount0,
amount1, amount1,
useFullPrecision: true, // we want full precision for the theoretical position
}) })
} else { } else {
return undefined return undefined
......
...@@ -4478,10 +4478,10 @@ ...@@ -4478,10 +4478,10 @@
"@uniswap/v3-core" "1.0.0" "@uniswap/v3-core" "1.0.0"
base64-sol "1.0.1" base64-sol "1.0.1"
"@uniswap/v3-sdk@^3.0.0-alpha.4": "@uniswap/v3-sdk@^3.0.0-alpha.5":
version "3.0.0-alpha.4" version "3.0.0-alpha.5"
resolved "https://registry.yarnpkg.com/@uniswap/v3-sdk/-/v3-sdk-3.0.0-alpha.4.tgz#e8bf26291fd74e36a5a3d9b88f1809a7aceb7d3a" resolved "https://registry.yarnpkg.com/@uniswap/v3-sdk/-/v3-sdk-3.0.0-alpha.5.tgz#b583bd2399abee1b329debb930f903d0d87ccc7c"
integrity sha512-BcEH8eHt+b6eaaiLDlzbFox2NquP1H7KgrgmNjAlU/et+vC4azdfNN6SsRlTFzhioPOwHlAKAAZJLq+yzboDOQ== integrity sha512-swuEzbQAzNw9ZA//EZN/qT3g6V3X5kTnB8FK8xRHAn3WE4mCMHMxut4Wt6iV24VlTHuVzx9EIoHS53rXHwjv4Q==
dependencies: dependencies:
"@ethersproject/abi" "^5.0.12" "@ethersproject/abi" "^5.0.12"
"@ethersproject/solidity" "^5.0.9" "@ethersproject/solidity" "^5.0.9"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment