Skip to content

Commit 190bde5

Browse files
committed
fix: backward compatibility logic for eu standard
1 parent 69518a1 commit 190bde5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/appstore/src/components/cfds-listing-logged-out/cfds-listing-logged-out.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ const CFDsListingLoggedOut = observer(() => {
2828
</Text>
2929
</div>
3030
{combined_cfd_mt5_accounts.map((existing_account, index: number) => {
31+
// This is for backward compatibility
32+
// before BE change, EU market_type is financial. With BE change, EU market_type becomes synthetic
33+
const is_eu_standard = is_eu_user && existing_account.market_type !== 'financial';
34+
3135
const list_size = combined_cfd_mt5_accounts.length;
36+
3237
return (
3338
<TradingAppCard
3439
action_type={existing_account.action_type}
3540
availability={selected_region}
3641
clickable_icon
37-
icon={existing_account.icon}
42+
icon={is_eu_standard ? 'Standard' : existing_account.icon}
3843
sub_title={existing_account?.sub_title}
39-
name={existing_account?.name ?? ''}
44+
name={is_eu_standard ? 'Standard' : existing_account.name}
4045
short_code_and_region={existing_account?.short_code_and_region}
4146
platform={existing_account.platform}
4247
description={existing_account.description}

0 commit comments

Comments
 (0)