Skip to content

Commit

Permalink
Merge pull request #119 from hasan-deriv/hasan/success-modal-text
Browse files Browse the repository at this point in the history
[TRAH] Hasan/TRAH-2669/Mt5 success modal content update
  • Loading branch information
thisyahlen-deriv authored Apr 23, 2024
2 parents 312f172 + 7478744 commit 4b3b3ec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cfd/modals/MT5PasswordModal/MT5Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ export const MT5Success = () => {
const isDemo = activeTrading?.is_virtual;
const marketType = marketTypeState ?? MarketType.ALL;

const isSwapFree = marketType === MarketType.ALL && platform === 'mt5';

const marketTypeTitle =
marketType === MarketType.ALL && platform && Object.keys(PlatformDetails).includes(platform)
!isSwapFree && marketType === MarketType.ALL && platform
? PlatformDetails[platform].title
: MarketTypeDetails(isEU)[marketType].title;

const landingCompanyName = `(${companyNamesAndUrls?.[selectedJurisdiction as TTM5FilterLandingCompany]?.shortcode})`;

const SuccessDescription = isDemo
? `Congratulations, you have successfully created your ${Category.DEMO} ${PlatformDetails.mt5.title} account. To start trading, transfer funds from your Deriv account into this account.`
: `Congratulations, you have successfully created your ${Category.REAL} ${PlatformDetails.mt5.title} ${landingCompanyName} account. To start trading, top-up funds from your Deriv account into this account.`;
? `Congratulations, you have successfully created your ${Category.DEMO} ${PlatformDetails.mt5.title} ${marketTypeTitle} account.`
: `Congratulations, you have successfully created your ${Category.REAL} ${PlatformDetails.mt5.title} ${marketTypeTitle} ${selectedJurisdiction?.toUpperCase()} account. To start trading, transfer funds from your Deriv account into this account.`;

const SuccessTitle = `Your ${marketTypeTitle} ${isDemo ? Category.DEMO : landingCompanyName} account is ready`;

Expand Down

0 comments on commit 4b3b3ec

Please sign in to comment.