Skip to content

Commit

Permalink
fix: fixed bug for DIEL accounts as well
Browse files Browse the repository at this point in the history
  • Loading branch information
aum-deriv committed Jul 3, 2023
1 parent 0031dcd commit 0a443f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions packages/core/src/App/Containers/Redirect/redirect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { WS } from 'Services';
const Redirect = ({
history,
currency,
setLoginId,
setVerificationCode,
verification_code,
hasAnyRealAccount,
Expand All @@ -27,11 +26,9 @@ const Redirect = ({
const { is_appstore } = React.useContext(PlatformContext);
const action_param = url_params.get('action');
const code_param = url_params.get('code') || verification_code[action_param];
const loginid_param = url_params.get('loginid');

setVerificationCode(code_param, action_param);
setNewEmail(url_params.get('email'), action_param);
if (loginid_param) setLoginId(loginid_param);

switch (action_param) {
case 'signup': {
Expand Down Expand Up @@ -213,7 +210,6 @@ Redirect.propTypes = {
export default withRouter(
connect(({ client, ui }) => ({
currency: client.currency,
setLoginId: client.setLoginId,
is_eu: client.is_eu,
setVerificationCode: client.setVerificationCode,
verification_code: client.verification_code,
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,7 @@ export default class ClientStore extends BaseStore {
const redirect_url = search_params?.get('redirect_url');
const code_param = search_params?.get('code');
const action_param = search_params?.get('action');
const loginid_param = search_params.get('loginid');
const unused_params = [
'type',
'acp',
Expand Down Expand Up @@ -1624,7 +1625,8 @@ export default class ClientStore extends BaseStore {
return false;
}

this.setLoginId(LocalStore.get('active_loginid'));
if (action_param === 'payment_withdraw' && loginid_param) this.setLoginId(loginid_param);
else this.setLoginId(LocalStore.get('active_loginid'));
this.setAccounts(LocalStore.getObject(storage_key));
this.setSwitched('');
const client = this.accounts[this.loginid];
Expand Down

0 comments on commit 0a443f9

Please sign in to comment.