Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Update confirmation text based on chainId (#2373)
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadV91 committed Feb 3, 2022
1 parent 1694f48 commit 95d6ded
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/custom/pages/Claim/InvestmentFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import RoundArrow from 'assets/cow-swap/round-arrow.svg'
import ImportantIcon from 'assets/cow-swap/important.svg'
import CowProtocolImage from 'assets/cow-swap/cowprotocol.svg'
import SVG from 'react-inlinesvg'
import { SupportedChainId } from 'constants/chains'

const STEPS_DATA = [
{
Expand All @@ -56,11 +57,12 @@ const STEPS_DATA = [
},
]

const FAQ_DATA = [
const FAQ_DATA = (chainId: number | undefined) => [
{
title: 'What will happen?',
content:
'By sending this Ethereum transaction, you will be investing tokens from the connected account and exchanging them for vCOW tokens that will be received by the claiming account specified above.',
content: `By sending this ${
chainId !== SupportedChainId.XDAI ? 'Ethereum' : ''
} transaction, you will be investing tokens from the connected account and exchanging them for vCOW tokens that will be received by the claiming account specified above.`,
},
{
title: 'Can I modify (partially) invested amounts later?',
Expand Down Expand Up @@ -147,7 +149,7 @@ function AccountDetails({ isClaimer, label, account, connectedAccount }: Account
}

export default function InvestmentFlow({ claims, hasClaims, isAirdropOnly, modalCbs }: InvestmentFlowProps) {
const { account } = useActiveWeb3React()
const { account, chainId } = useActiveWeb3React()
const { selected, activeClaimAccount, claimStatus, isInvestFlowActive, investFlowStep, investFlowData } =
useClaimState()
const { initInvestFlowData } = useClaimDispatchers()
Expand Down Expand Up @@ -286,7 +288,7 @@ export default function InvestmentFlow({ claims, hasClaims, isAirdropOnly, modal
</AccountClaimSummary>

<h4>Ready to claim your vCOW?</h4>
<FaqDrawer items={FAQ_DATA} />
<FaqDrawer items={FAQ_DATA(chainId)} />
<UserMessage variant={'info'}>
<SVG src={ImportantIcon} description="Information" />
<span>
Expand Down

0 comments on commit 95d6ded

Please sign in to comment.