diff --git a/packages/core/src/App/Containers/Redirect/redirect.jsx b/packages/core/src/App/Containers/Redirect/redirect.jsx index 3af81f7df278..f0426e0b8fa0 100644 --- a/packages/core/src/App/Containers/Redirect/redirect.jsx +++ b/packages/core/src/App/Containers/Redirect/redirect.jsx @@ -9,7 +9,6 @@ import { WS } from 'Services'; const Redirect = ({ history, currency, - setLoginId, setVerificationCode, verification_code, hasAnyRealAccount, @@ -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': { @@ -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, diff --git a/packages/core/src/Stores/client-store.js b/packages/core/src/Stores/client-store.js index 02e5deb1ccbd..a4fa4c36c745 100644 --- a/packages/core/src/Stores/client-store.js +++ b/packages/core/src/Stores/client-store.js @@ -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', @@ -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];