Skip to content

Commit

Permalink
chore: update description content for derivx success modal demo (deri…
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv authored Nov 30, 2023
1 parent 36d1841 commit 67cb907
Showing 1 changed file with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const DxtradeEnterPasswordModal = () => {

const successDescription = useMemo(() => {
return accountType === 'demo'
? 'Transfer virtual funds from your Demo Wallet to your Deriv X Demo account to practise trading.'
: `Transfer funds from your ${activeWallet?.currency} Wallet to your Deriv X account to start trading.`;
? "Let's practise trading with 10,000 USD virtual funds."
: `Transfer funds from your ${activeWallet?.currency} Wallet to your ${PlatformDetails.dxtrade.title} account to start trading.`;
}, [accountType, activeWallet?.currency]);

const dxtradeBalance = useMemo(() => {
Expand All @@ -46,6 +46,18 @@ const DxtradeEnterPasswordModal = () => {

const renderFooter = useMemo(() => {
if (isSuccess) {
if (accountType === 'demo') {
return (
<WalletButton
isFullWidth
onClick={() => {
hide();
}}
size='lg'
text='OK'
/>
);
}
return (
<WalletButtonGroup isFlex isFullWidth>
<WalletButton onClick={() => hide()} size='lg' text='Maybe later' variant='outlined' />
Expand Down Expand Up @@ -99,7 +111,7 @@ const DxtradeEnterPasswordModal = () => {
text={`Create ${PlatformDetails.dxtrade.title} password`}
/>
);
}, [hide, history, isDxtradePasswordNotSet, isLoading, isSuccess, onSubmit, password, show]);
}, [accountType, hide, history, isDxtradePasswordNotSet, isLoading, isSuccess, onSubmit, password, show]);

const successComponent = useMemo(() => {
if (isSuccess && dxtradeAccountListSuccess) {
Expand All @@ -110,7 +122,9 @@ const DxtradeEnterPasswordModal = () => {
marketType='all'
platform='dxtrade'
renderButton={() => renderFooter}
title={`Your Deriv X${accountType === 'demo' ? ` ${accountType}` : ''} account is ready`}
title={`Your ${PlatformDetails.dxtrade.title}${
accountType === 'demo' ? ` ${accountType}` : ''
} account is ready`}
/>
);
}
Expand Down

0 comments on commit 67cb907

Please sign in to comment.