From 655cd81e879767e2aa4187d30576a04eb2ea78ea Mon Sep 17 00:00:00 2001 From: esaminu Date: Tue, 8 Feb 2022 18:04:48 +0400 Subject: [PATCH] fix: re-add missed pathname when reconstructing url --- packages/frontend/src/redux/actions/account.js | 2 +- packages/frontend/src/redux/slices/sign/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/redux/actions/account.js b/packages/frontend/src/redux/actions/account.js index d3f4a1db2a..5659bdf8cf 100644 --- a/packages/frontend/src/redux/actions/account.js +++ b/packages/frontend/src/redux/actions/account.js @@ -209,7 +209,7 @@ export const allowLogin = () => async (dispatch, getState) => { const allKeys = availableKeys.map(key => key.toString()); const url = new URL(successUrl); const originalSearchParams = parse(url.search); - window.location = `${url.origin}?${stringify( + window.location = `${url.origin}${url.pathname}?${stringify( { ...originalSearchParams, account_id: wallet.accountId, diff --git a/packages/frontend/src/redux/slices/sign/index.js b/packages/frontend/src/redux/slices/sign/index.js index ed64929650..60e080a934 100644 --- a/packages/frontend/src/redux/slices/sign/index.js +++ b/packages/frontend/src/redux/slices/sign/index.js @@ -83,7 +83,7 @@ export const handleSignTransactions = createAsyncThunk( export function addQueryParams(baseUrl, queryParams = {}) { const url = new URL(baseUrl); const originalSearchParams = parse(url.search); - return `${url.origin}?${stringify({...originalSearchParams, ...queryParams}, { + return `${url.origin}${url.pathname}?${stringify({...originalSearchParams, ...queryParams}, { skipEmptyString: true, skipNull: true, })}`;