Skip to content

Commit

Permalink
univ3 - mint - out of range process
Browse files Browse the repository at this point in the history
  • Loading branch information
shendel committed Sep 25, 2024
1 parent 0f4c66b commit 2ffe7bf
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 223 deletions.
46 changes: 20 additions & 26 deletions src/front/shared/pages/Exchange/QuickSwap/UniV3Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@ function UniV3Pools(props) {
return (isWrapped) ? network.currency : token.symbol
}

const renderMintPosition = () => {
return (
<MintPosition
token0Address={token0}
token1Address={token1}
token0Wallet={token0Wallet}
token1Wallet={token1Wallet}
activePair={currentLiquidityPair}
setCurrentAction={setCurrentAction}
baseCurrency={network.currency}
chainId={network.networkVersion}
userDeadline={userDeadline}
slippage={slippage}
intl={intl}
owner={userWalletAddress}
/>
)
}
return (
<div id="uniV3Holder">
{/*
Expand Down Expand Up @@ -269,19 +287,7 @@ function UniV3Pools(props) {
{currentLiquidityPair == null ? (
<>
{currentAction == PositionAction.MINT_POSITION && (
<MintPosition
token0Address={token0}
token1Address={token1}
token0Wallet={token0Wallet}
token1Wallet={token1Wallet}
activePair={currentLiquidityPair}
setCurrentAction={setCurrentAction}
baseCurrency={network.currency}
chainId={network.networkVersion}
userDeadline={userDeadline}
slippage={slippage}
intl={intl}
/>
<>{renderMintPosition()}</>
)}
{currentAction == PositionAction.LIST && (
<div>
Expand All @@ -307,19 +313,7 @@ function UniV3Pools(props) {
) : (
<>
{currentAction == PositionAction.MINT_POSITION && (
<MintPosition
token0Address={token0}
token1Address={token1}
token0Wallet={token0Wallet}
token1Wallet={token1Wallet}
activePair={currentLiquidityPair}
setCurrentAction={setCurrentAction}
baseCurrency={network.currency}
chainId={network.networkVersion}
userDeadline={userDeadline}
slippage={slippage}
intl={intl}
/>
<>{renderMintPosition()}</>
)}
{currentAction == PositionAction.LIST && (
<>
Expand Down
Loading

0 comments on commit 2ffe7bf

Please sign in to comment.