Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thisyahlen/79484/redirectlogin #2

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1963,8 +1963,15 @@ export default class ClientStore extends BaseStore {
}

const is_client_logging_in = login_new_user ? login_new_user.token1 : obj_params.token1;

if (is_client_logging_in) {
window.history.replaceState({}, document.title, sessionStorage.getItem('redirect_url'));
const DERIV_PRE_APPSTORE_KEY = 'is_pre_appstore';
thisyahlen-deriv marked this conversation as resolved.
Show resolved Hide resolved
const is_pre_appstore = window.localStorage.getItem(DERIV_PRE_APPSTORE_KEY);
if (is_pre_appstore === 'true') {
thisyahlen-deriv marked this conversation as resolved.
Show resolved Hide resolved
window.history.replaceState({}, document.title, '/appstore/trading-hub');
} else {
window.history.replaceState({}, document.title, sessionStorage.getItem('redirect_url'));
}
SocketCache.clear();
// is_populating_account_list is used for socket general to know not to filter the first-time logins
this.is_populating_account_list = true;
Expand Down