Skip to content

Commit

Permalink
fix: fixed the MT5 account creation flow and the showing of the corre…
Browse files Browse the repository at this point in the history
…ct shortcode in success screen
  • Loading branch information
aum-deriv committed May 3, 2024
1 parent a5bd749 commit 6696294
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type TCompareAccountButton = {

const CompareAccountsButton = ({ isAccountAdded, marketType, platform, shortCode }: TCompareAccountButton) => {
const history = useHistory();
const { show } = useModal();
const { setModalState, show } = useModal();

const switchWalletAccount = useWalletAccountSwitcher();
const { data: accountSettings } = useSettings();
Expand Down Expand Up @@ -122,6 +122,8 @@ const CompareAccountsButton = ({ isAccountAdded, marketType, platform, shortCode
});
}
if (platform === CFD_PLATFORMS.MT5) {
setModalState('marketType', marketType);
setModalState('selectedJurisdiction', shortCode);
if (isAccountStatusVerified) {
show(<MT5PasswordModal marketType={marketType ?? 'synthetic'} platform={platform} />);
} else {
Expand Down

0 comments on commit 6696294

Please sign in to comment.