From 0ea9dc046b3ade0cd6ab72eb410519312c62c804 Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Tue, 27 Apr 2021 19:42:39 -0500 Subject: [PATCH] bumped v3 sdk version --- package.json | 2 +- src/pages/AddLiquidity/index.tsx | 23 ++++++++--------------- yarn.lock | 8 ++++---- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index fe9567df8d..49a7cfafca 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@uniswap/v2-sdk": "^1.0.9", "@uniswap/v3-core": "^1.0.0-rc.2", "@uniswap/v3-periphery": "^1.0.0-beta.20", - "@uniswap/v3-sdk": "^1.0.0-alpha.23", + "@uniswap/v3-sdk": "^1.0.0-alpha.24", "@web3-react/core": "^6.0.9", "@web3-react/fortmatic-connector": "^6.0.9", "@web3-react/injected-connector": "^6.0.7", diff --git a/src/pages/AddLiquidity/index.tsx b/src/pages/AddLiquidity/index.tsx index 23c6e580f7..28c00877c3 100644 --- a/src/pages/AddLiquidity/index.tsx +++ b/src/pages/AddLiquidity/index.tsx @@ -187,21 +187,14 @@ export default function AddLiquidity({ } if (position && account && deadline && fractionalizedTolerance) { - const { calldata, value } = - hasExistingPosition && tokenId - ? NonfungiblePositionManager.increaseLiquidityCallParameters(position, { - tokenId: tokenId, - slippageTolerance: fractionalizedTolerance, - deadline: deadline.toNumber(), - useEther: currencyA === ETHER || currencyB === ETHER, - }) - : NonfungiblePositionManager.mintCallParameters(position, { - slippageTolerance: fractionalizedTolerance, - recipient: account, - deadline: deadline.toNumber(), - useEther: currencyA === ETHER || currencyB === ETHER, - createPool: noLiquidity, - }) + const { calldata, value } = NonfungiblePositionManager.increaseCallParameters(position, { + ...(hasExistingPosition && tokenId ? { tokenId } : {}), + slippageTolerance: fractionalizedTolerance, + recipient: account, + deadline: deadline.toNumber(), + useEther: currencyA === ETHER || currencyB === ETHER, + createPool: noLiquidity, + }) const txn = { to: NONFUNGIBLE_POSITION_MANAGER_ADDRESSES[chainId], diff --git a/yarn.lock b/yarn.lock index 16161f1413..08c2432767 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4158,10 +4158,10 @@ "@uniswap/v2-core" "1.0.1" "@uniswap/v3-core" "1.0.0-rc.2" -"@uniswap/v3-sdk@^1.0.0-alpha.23": - version "1.0.0-alpha.23" - resolved "https://registry.yarnpkg.com/@uniswap/v3-sdk/-/v3-sdk-1.0.0-alpha.23.tgz#0971b38acd46e08d727f17ad8b10b5c21a25b99f" - integrity sha512-ibVW9EnwymIQAHBCCQCorwA5yLzRfQ4OYwafTkD1fHx2UtrZoHVYLBSshMa4tcN1uMAuiglFOQv/IIJ20ZRgyw== +"@uniswap/v3-sdk@^1.0.0-alpha.24": + version "1.0.0-alpha.24" + resolved "https://registry.yarnpkg.com/@uniswap/v3-sdk/-/v3-sdk-1.0.0-alpha.24.tgz#c516d3dfb5de84e92a1d22fe065fd2223b77725f" + integrity sha512-X06R2y3xntZoLFSrGp/JVLYOc6l9wSFcLj3qjgCL16ktRtkTVJFoMTa4gk48/DZ0+uQe3R4S2YJrBbeqWhd5Ww== dependencies: "@ethersproject/abi" "^5.0.12" "@ethersproject/solidity" "^5.0.9"