fix: don't show the add liquidity warning when no position currently … (#6238)

fix: don't show the add liquidity warning when no position currently exists
This commit is contained in:
Jordan Frankfurt 2023-03-23 17:18:35 -04:00 committed by GitHub
parent 18ec675c52
commit d179fc6b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -555,7 +555,7 @@ export default function AddLiquidity() {
const owner = useSingleCallResult(tokenId ? positionManager : null, 'ownerOf', [tokenId]).result?.[0]
const ownsNFT =
addressesAreEquivalent(owner, account) || addressesAreEquivalent(existingPositionDetails?.operator, account)
const showOwnershipWarning = Boolean(account && !ownsNFT)
const showOwnershipWarning = Boolean(hasExistingPosition && account && !ownsNFT)
return (
<>