Skip to content

Commit

Permalink
Merge pull request #6182 from blockchain/release/v4.96
Browse files Browse the repository at this point in the history
Release/v4.96
  • Loading branch information
TheLeoB committed Dec 14, 2023
2 parents caf4925 + 37de78a commit 8428a1e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockchain-wallet-v4",
"version": "4.96.1",
"version": "4.96.2",
"license": "AGPL-3.0-or-later",
"private": true,
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,12 +687,26 @@ export default ({ api, coreSagas, networks }) => {
const initiateSofiLanding = function* () {
yield put(A.fetchSofiMigrationStatusLoading())
try {
const url = window.location.href
const queryParams = new URLSearchParams(yield select(selectors.router.getSearch))
const aesCiphertext = queryParams.get('aesCiphertext') as string
const aesIV = queryParams.get('aesIV') as string
const aesTag = queryParams.get('aesTag') as string
const aesKeyCiphertext = queryParams.get('aesKeyCiphertext') as string

function getQueryParamCaseInsensitive(url, paramName) {
// Create URLSearchParams object from the URL
const normalizedParamName = paramName.toLowerCase()
// Iterate over all query parameters
for (const [key, value] of queryParams) {
if (key.toLowerCase() === normalizedParamName) {
return value
}
}
// If the parameter is not found, return null or undefined
return null
}

const aesCiphertext = getQueryParamCaseInsensitive(url, 'aesCiphertext') as string
const aesIV = getQueryParamCaseInsensitive(url, 'aesIV') as string
const aesTag = getQueryParamCaseInsensitive(url, 'aesTag') as string
const aesKeyCiphertext = getQueryParamCaseInsensitive(url, 'aesKeyCipherText') as string
// if there are no params in url, just `/sofi`
// redirect them to login page
// TODO
Expand Down

0 comments on commit 8428a1e

Please sign in to comment.