Skip to content

Commit 92eea90

Browse files
Merge pull request #425 from ameerul-deriv/WEBREL-3442-on-redirection-from-th-to-p2p-showing-infinite-loading
Ameerul / WEBREL-3442 On Redirection to from traders hub to P2P the P2P page shows infinite loading screen
2 parents fffba41 + 00a5106 commit 92eea90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/custom-hooks/useOAuth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ const useOAuth = (): UseOAuthReturn => {
4949
const authTokenCookie = Cookies.get('authtoken');
5050

5151
if (from === 'tradershub' && authTokenCookie) {
52-
localStorage.setItem('authToken', authTokenCookie);
52+
const cleanedAuthToken = decodeURIComponent(authTokenCookie).replace(/^"|"$/g, '');
53+
localStorage.setItem('authToken', cleanedAuthToken);
5354
Cookies.remove('authtoken');
5455
window.location.href = window.location.origin;
5556
}

0 commit comments

Comments
 (0)