Skip to content

Commit 17901ab

Browse files
authored
Merge pull request #1737 from curvefi/monad-alert-banner
feat: temp monad pool factory-stable-ng-11 banner
2 parents d517730 + 59c6fbd commit 17901ab

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Banner } from '@ui-kit/shared/ui/Banner'
2+
import { Stack } from '@mui/material'
3+
import { t } from '@ui-kit/lib/i18n'
4+
import { PoolUrlParams } from '../types/main.types'
5+
6+
const MonadBannerAlert = ({ params }: { params: PoolUrlParams }) => {
7+
const showFactoryStableNg11Banner = params.pool === 'factory-stable-ng-11' && params.network === 'monad'
8+
9+
if (showFactoryStableNg11Banner)
10+
return (
11+
<Stack>
12+
<Banner severity="alert">
13+
{t`This pool has been misconfigured. It has been set to withdraw only. To minimize impact withdraw in balanced proportion instead of single sided.`}
14+
</Banner>
15+
</Stack>
16+
)
17+
}
18+
19+
export default MonadBannerAlert

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import useStore from '@/dex/store/useStore'
2020
import { getChainPoolIdActiveKey } from '@/dex/utils'
2121
import { getPath } from '@/dex/utils/utilsRouter'
2222
import { ManageGauge } from '@/dex/widgets/manage-gauge'
23+
import type { PoolUrlParams } from '@/dex/types/main.types'
2324
import Stack from '@mui/material/Stack'
2425
import AlertBox from '@ui/AlertBox'
2526
import { AppFormContentWrapper } from '@ui/AppForm'
@@ -44,6 +45,7 @@ import { t } from '@ui-kit/lib/i18n'
4445
import { REFRESH_INTERVAL } from '@ui-kit/lib/model'
4546
import { type TabOption, TabsSwitcher } from '@ui-kit/shared/ui/TabsSwitcher'
4647
import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces'
48+
import MonadBannerAlert from '../MonadBannerAlert'
4749

4850
const DEFAULT_SEED: Seed = { isSeed: null, loaded: false }
4951
const { MaxWidth } = SizesAndSpaces
@@ -54,7 +56,6 @@ const Transfer = (pageTransferProps: PageTransferProps) => {
5456
const { signerAddress } = curve ?? {}
5557
const push = useNavigate()
5658
const poolAlert = usePoolAlert(poolData)
57-
5859
const { tokensMapper } = useTokensMapper(rChainId)
5960
const userPoolActiveKey = curve && rPoolId ? getUserPoolActiveKey(curve, rPoolId) : ''
6061
const chainIdPoolId = getChainPoolIdActiveKey(rChainId, rPoolId)
@@ -206,6 +207,7 @@ const Transfer = (pageTransferProps: PageTransferProps) => {
206207

207208
return (
208209
<>
210+
<MonadBannerAlert params={params as PoolUrlParams} />
209211
<AppPageFormContainer isAdvanceMode={true}>
210212
<AppPageFormsWrapper className="grid-transfer">
211213
<Stack

0 commit comments

Comments
 (0)