Skip to content

Commit

Permalink
fix: set transfer_to after real cfd account creation (#18075)
Browse files Browse the repository at this point in the history
  • Loading branch information
shontzu-deriv authored Mar 3, 2025
1 parent 2d08cc4 commit 37d75fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/cfd/src/Stores/Modules/CFD/cfd-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ export default class CFDStore extends BaseStore {
trading_platform_available_accounts_list_response
);
this.setCFDSuccessDialog(true);
window.sessionStorage.setItem(
'cfd_transfer_to_login_id',
response.trading_platform_new_account.account_id
);
this.setIsAccountBeingCreated(false);
WS.tradingPlatformAccountsList(CFD_PLATFORMS.CTRADER);
setPerformanceValue('create_ctrader_account_time');
Expand Down Expand Up @@ -591,6 +595,7 @@ export default class CFDStore extends BaseStore {
actions?.setSubmitting(false);
this.setError(false);
this.setIsMt5PasswordChangedModalVisible(false);
window.sessionStorage.setItem('cfd_transfer_to_login_id', response.mt5_new_account.login);
this.setCFDSuccessDialog(true);
await this.getAccountStatus(CFD_PLATFORMS.MT5);

Expand Down Expand Up @@ -650,6 +655,7 @@ export default class CFDStore extends BaseStore {
actions.setSubmitting(false);
this.setError(false);
this.setCFDSuccessDialog(true);
window.sessionStorage.setItem('cfd_transfer_to_login_id', response.trading_platform_new_account.account_id);
await this.getAccountStatus(CFD_PLATFORMS.DXTRADE);

const trading_platform_accounts_list_response = await WS.tradingPlatformAccountsList(values.platform);
Expand Down

0 comments on commit 37d75fe

Please sign in to comment.