Skip to content

Commit

Permalink
feature: check for locked ALEX tokens and show different banner copy
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt committed Jul 17, 2024
1 parent 8363be4 commit caeb879
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
25 changes: 21 additions & 4 deletions apps/evm/src/pages/Fusion/components/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Card, Flex, InformationCircle, P } from '@gobob/ui';
import { Card, Flex, InformationCircle, P, TextLink } from '@gobob/ui';
import { useAccount } from '@gobob/wagmi';
import { useTranslation } from 'react-i18next';
import { useMemo } from 'react';

import { useGetUser } from '../../../../hooks';
import { LoginSignUp } from '../LoginSignUp';
import { StyledCard } from '../PartnersSection/PartnerCard.style';
import { ProjectStatus } from '../ProjectStatus';
import { UserStats } from '../UserStats';
import { useHaltedLockedTokens } from '../../hooks';

const Dashboard = () => {
const { address } = useAccount();
Expand All @@ -15,13 +17,28 @@ const Dashboard = () => {

const isAuthenticated = !!address && !!user;

const { data: haltedLockedTokens } = useHaltedLockedTokens();

const hasAlex = useMemo(() => haltedLockedTokens?.find((token) => token.raw.symbol === 'ALEX'), [haltedLockedTokens]);

return (
<Flex direction='column' gap='xl' marginTop='3xl'>
<StyledCard alignItems='center' direction='row' gap='md'>
<InformationCircle />
<P size='s' weight='semibold'>
{t('fusion.spiceWaitTime')}
</P>
{hasAlex ? (
<P size='s' weight='semibold'>
Due to an exploit involving the XLink bridge, Alex Lab has disabled bridging and withdrawing ALEX. You can
migrate the ALEX tokens that you have in Fusion Season 1 to ALEX V2. For additional details see the{' '}
<TextLink external href='https://x.com/ALEXLabBTC/status/1790815791832498291' size='inherit'>
announcement from ALEX Lab
</TextLink>
.
</P>
) : (
<P size='s' weight='semibold'>
{t('fusion.spiceWaitTime')}
</P>
)}
</StyledCard>
<Flex direction={{ base: 'column', md: 'row' }} gap='3xl'>
<Card flex={0.55} gap='lg' padding='3xl'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const WithdrawModal = ({ isSmartAccount, onClose, onWithdrawalMutationComplete,
<InformationCircle />
<P color='grey-200' size='s'>
Due to an exploit involving the XLink bridge, Alex Lab has disabled bridging and withdrawing ALEX. If you
possess ALEX tokens from Fusion Season 1, you can migrate them to Alex V2. For additional details see the{' '}
possess ALEX tokens from Fusion Season 1, you can migrate them to ALEX V2. For additional details see the{' '}
<TextLink external href='https://x.com/ALEXLabBTC/status/1790815791832498291' size='inherit'>
announcement from ALEX Lab
</TextLink>
Expand Down

0 comments on commit caeb879

Please sign in to comment.