Skip to content

Commit

Permalink
fix: tick = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Oct 16, 2023
1 parent 9963b5b commit 797659b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/pages/AddLiquidityV2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,10 @@ export default function AddLiquidity() {
outOfRange ||
slippageStatus === SLIPPAGE_STATUS.HIGH ||
farmPosWarning
const warnings = showWarning && (

const warnings = !!showWarning && (
<Flex flexDirection="column" sx={{ gap: '12px' }} width="100%">
{noLiquidity && (
{!!noLiquidity && (
<SubTextCard padding="10px 16px">
<Flex alignItems="center">
<TYPE.black ml="12px" fontSize="12px" flex={1}>
Expand All @@ -878,7 +879,7 @@ export default function AddLiquidity() {
</Flex>
</SubTextCard>
)}
{isPriceDeviated && (
{!!isPriceDeviated && (
<WarningCard padding="10px 16px">
<Flex alignItems="center">
<AlertTriangle stroke={theme.warning} size="16px" />
Expand Down Expand Up @@ -921,7 +922,7 @@ export default function AddLiquidity() {
</Flex>
</WarningCard>
)}
{invalidRange ? (
{!!invalidRange ? (
<WarningCard padding="10px 16px">
<Flex alignItems="center">
<AlertTriangle stroke={theme.warning} size="16px" />
Expand Down Expand Up @@ -951,7 +952,7 @@ export default function AddLiquidity() {
</Flex>
</WarningCard>
) : null}
{farmPosWarning && (
{!!farmPosWarning && (
<WarningCard padding="10px 16px">
<Flex alignItems="center">
<AlertTriangle stroke={theme.warning} size="16px" />
Expand Down Expand Up @@ -1093,7 +1094,7 @@ export default function AddLiquidity() {
const tickReader = useProAmmTickReader()

const results = useSingleContractMultipleData(
tickLower && tickUpper ? tickReader : undefined,
tickLower !== undefined && tickUpper !== undefined ? tickReader : undefined,
'getNearestInitializedTicks',
[
[poolAddress, tickLower],
Expand Down

0 comments on commit 797659b

Please sign in to comment.