Skip to content

Commit bcb0d11

Browse files
committed
fix: monad banner should work for pool address too
1 parent b336e02 commit bcb0d11

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apps/main/src/dex/components/MonadBannerAlert.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Stack } from '@mui/material'
22
import { t } from '@ui-kit/lib/i18n'
33
import { Banner } from '@ui-kit/shared/ui/Banner'
4-
import { PoolUrlParams } from '../types/main.types'
4+
import { usePoolIdByAddressOrId } from '../hooks/usePoolIdByAddressOrId'
55

6-
const MonadBannerAlert = ({ params }: { params: PoolUrlParams }) => {
7-
const showFactoryStableNg11Banner = params.poolIdOrAddress === 'factory-stable-ng-11' && params.network === 'monad'
6+
const MonadBannerAlert = ({ chainId, poolIdOrAddress }: { chainId: number; poolIdOrAddress: string }) => {
7+
const poolId = usePoolIdByAddressOrId({ chainId, poolIdOrAddress })
8+
const showFactoryStableNg11Banner = poolId === 'factory-stable-ng-11'
89

910
if (showFactoryStableNg11Banner)
1011
return (

apps/main/src/dex/components/PagePool/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { usePoolIdByAddressOrId } from '@/dex/hooks/usePoolIdByAddressOrId'
1818
import useTokensMapper from '@/dex/hooks/useTokensMapper'
1919
import { getUserPoolActiveKey } from '@/dex/store/createUserSlice'
2020
import useStore from '@/dex/store/useStore'
21-
import type { PoolUrlParams } from '@/dex/types/main.types'
2221
import { getChainPoolIdActiveKey } from '@/dex/utils'
2322
import { getPath } from '@/dex/utils/utilsRouter'
2423
import { ManageGauge } from '@/dex/widgets/manage-gauge'
@@ -208,7 +207,7 @@ const Transfer = (pageTransferProps: PageTransferProps) => {
208207

209208
return (
210209
<>
211-
<MonadBannerAlert params={params as PoolUrlParams} />
210+
<MonadBannerAlert chainId={rChainId} poolIdOrAddress={rPoolIdOrAddress} />
212211
<AppPageFormContainer isAdvanceMode={true}>
213212
<AppPageFormsWrapper className="grid-transfer">
214213
<Stack

0 commit comments

Comments
 (0)