Skip to content

Commit 2943c4b

Browse files
authored
Merge pull request #308 from mstable/feat/add-wallet-address-warning-during-v1-redeeming
feat(dHEDGE V1 Deprecation): add wallet address hint message
2 parents f7bdbd4 + 1689fde commit 2943c4b

File tree

1 file changed

+19
-10
lines changed
  • libs/dhedge/withdraw/src/components/BurnForm/components/InputStep

1 file changed

+19
-10
lines changed

libs/dhedge/withdraw/src/components/BurnForm/components/InputStep/index.tsx

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { DHEDGE_DAPP_LINK } from '@frontend/shared-constants';
1+
import { DHEDGE_DAPP_LINK, ZERO_ADDRESS } from '@frontend/shared-constants';
22
import { OpenAccountModalButton } from '@frontend/shared-providers';
33
import { MotionStack } from '@frontend/shared-ui';
44
import { Button, Stack, Typography } from '@mui/material';
55
import { constants } from 'ethers';
66
import { useAccount, useNetwork, useSwitchNetwork } from 'wagmi';
77

8-
import { l1Chain } from '../../../../constants';
8+
import { l1Chain, l2Chain } from '../../../../constants';
99
import { useNeedsApproval } from '../../../../hooks/useNeedsApproval';
1010
import { useSetStep } from '../../hooks';
1111
import { useTrackedState } from '../../state';
@@ -27,14 +27,18 @@ export const InputStep = (props: MotionStackProps) => {
2727
return (
2828
<MotionStack alignItems="flex-start" {...props}>
2929
<Typography variant="h5" mb={1}>
30-
Redeem your dHEDGE V1{' '}
31-
<a
32-
href={`${DHEDGE_DAPP_LINK}/vault/${l1token.contract.address}`}
33-
target="_blank"
34-
rel="noreferrer"
35-
>
36-
{l1token.contract.name ?? 'vault'}
37-
</a>{' '}
30+
Redeem your V1{' '}
31+
{l1token.contract.address === ZERO_ADDRESS ? (
32+
'vault'
33+
) : (
34+
<a
35+
href={`${DHEDGE_DAPP_LINK}/vault/${l1token.contract.address}`}
36+
target="_blank"
37+
rel="noreferrer"
38+
>
39+
{l1token.contract.name ?? 'vault'}
40+
</a>
41+
)}{' '}
3842
tokens to receive{' '}
3943
<a
4044
href={`${DHEDGE_DAPP_LINK}/vault/${l2token.contract.address}`}
@@ -49,6 +53,11 @@ export const InputStep = (props: MotionStackProps) => {
4953
After redeeming your vault tokens from Ethereum, please wait while the
5054
bridge issues your {l2token.contract.symbol} tokens.
5155
</Typography>
56+
<Typography variant="hint" color="warning.dark">
57+
Your {l2token.contract.symbol} tokens will be sent to the same{' '}
58+
{l2Chain.name} address you used.
59+
</Typography>
60+
5261
<Stack width={1} justifyContent="center" alignItems="center" my={8}>
5362
<Stack width={{ xs: 'auto', lg: 3 / 4 }}>
5463
<TokenInputs mb={4} />

0 commit comments

Comments
 (0)