Skip to content

Commit

Permalink
chore: rename PoolType -> V3PoolType
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMasayoshi committed Nov 10, 2024
1 parent 8553cb9 commit a227263
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions apps/web/src/app/(networks)/(evm)/[chainId]/pool/v3/add/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { SelectPricesWidget } from 'src/ui/pool/SelectPricesWidget'
import { SelectSmartPoolStrategyWidget } from 'src/ui/pool/SelectSmartPoolStrategyWidget'
import { SelectTokensWidget } from 'src/ui/pool/SelectTokensWidget'
import {
PoolType,
SelectV3PoolTypeWidget,
V3PoolType,
} from 'src/ui/pool/SelectV3PoolTypeWidget'
import { SmartPoolLiquidityWidget } from 'src/ui/pool/SmartPoolLiquidityWidget'
import { ChainKey, computeSushiSwapV3PoolAddress } from 'sushi'
Expand Down Expand Up @@ -102,13 +102,13 @@ const _Add: FC = () => {

const [vaultIndex, setVaultIndex] = useState(0)

const [poolType, setPoolType] = useState<PoolType>(PoolType.MANUAL)
const [poolType, setPoolType] = useState<V3PoolType>(V3PoolType.MANUAL)

useEffect(() => {
if (vaults && vaults.length > 0) {
setPoolType(PoolType.SMART)
setPoolType(V3PoolType.SMART)
} else {
setPoolType(PoolType.MANUAL)
setPoolType(V3PoolType.MANUAL)
}
}, [vaults])

Expand Down Expand Up @@ -138,7 +138,7 @@ const _Add: FC = () => {
setPoolType={setPoolType}
isSmartPoolSupported={Boolean(vaults?.length)}
/>
{poolType === PoolType.MANUAL ? (
{poolType === V3PoolType.MANUAL ? (
<>
<SelectPricesWidget
chainId={chainId}
Expand All @@ -163,7 +163,7 @@ const _Add: FC = () => {
successLink={`/${ChainKey[chainId]}/pool/v3/${poolAddress}/${tokenId}`}
/>
</>
) : poolType === PoolType.SMART && vaults ? (
) : poolType === V3PoolType.SMART && vaults ? (
<>
<SelectSmartPoolStrategyWidget
chainId={chainId as SmartPoolChainId}
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/ui/pool/NewPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useAccount } from 'wagmi'
import { ConcentratedLiquidityWidget } from './ConcentratedLiquidityWidget'
import { SelectPricesWidget } from './SelectPricesWidget'
import { SelectSmartPoolStrategyWidget } from './SelectSmartPoolStrategyWidget'
import { PoolType, SelectV3PoolTypeWidget } from './SelectV3PoolTypeWidget'
import { SelectV3PoolTypeWidget, V3PoolType } from './SelectV3PoolTypeWidget'
import { SmartPoolLiquidityWidget } from './SmartPoolLiquidityWidget'

interface NewPositionProps {
Expand Down Expand Up @@ -63,13 +63,13 @@ export const NewPosition: FC<NewPositionProps> = ({ address, chainId }) => {

const [vaultIndex, setVaultIndex] = useState(0)

const [poolType, setPoolType] = useState<PoolType>(PoolType.MANUAL)
const [poolType, setPoolType] = useState<V3PoolType>(V3PoolType.MANUAL)

useEffect(() => {
if (vaults && vaults.length > 0) {
setPoolType(PoolType.SMART)
setPoolType(V3PoolType.SMART)
} else {
setPoolType(PoolType.MANUAL)
setPoolType(V3PoolType.MANUAL)
}
}, [vaults])

Expand All @@ -90,7 +90,7 @@ export const NewPosition: FC<NewPositionProps> = ({ address, chainId }) => {
setPoolType={setPoolType}
isSmartPoolSupported={Boolean(vaults?.length)}
/>
{poolType === PoolType.MANUAL ? (
{poolType === V3PoolType.MANUAL ? (
<>
<SelectPricesWidget
chainId={chainId}
Expand All @@ -113,7 +113,7 @@ export const NewPosition: FC<NewPositionProps> = ({ address, chainId }) => {
successLink={`/${ChainKey[chainId]}/pool/v3/${address}/positions`}
/>
</>
) : poolType === PoolType.SMART && vaults ? (
) : poolType === V3PoolType.SMART && vaults ? (
<>
<SelectSmartPoolStrategyWidget
chainId={chainId as SmartPoolChainId}
Expand Down
10 changes: 5 additions & 5 deletions apps/web/src/ui/pool/SelectV3PoolTypeWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
} from '@sushiswap/ui'
import { FC } from 'react'

export enum PoolType {
export enum V3PoolType {
MANUAL = 'manual',
SMART = 'smart',
}

interface SelectV3PoolTypeWidgetProps {
poolType: PoolType
setPoolType: (poolType: PoolType) => void
poolType: V3PoolType
setPoolType: (poolType: V3PoolType) => void
isSmartPoolSupported: boolean
}

Expand Down Expand Up @@ -45,7 +45,7 @@ export const SelectV3PoolTypeWidget: FC<SelectV3PoolTypeWidgetProps> = ({
className="grid grid-cols-2 gap-4"
>
<RadioGroup.Option
value={PoolType.SMART}
value={V3PoolType.SMART}
disabled={!isSmartPoolSupported}
>
{({ checked }) => (
Expand All @@ -63,7 +63,7 @@ export const SelectV3PoolTypeWidget: FC<SelectV3PoolTypeWidgetProps> = ({
</Toggle>
)}
</RadioGroup.Option>
<RadioGroup.Option value={PoolType.MANUAL}>
<RadioGroup.Option value={V3PoolType.MANUAL}>
{({ checked }) => (
<Toggle
pressed={checked}
Expand Down

0 comments on commit a227263

Please sign in to comment.