Skip to content

Commit

Permalink
fix/reset-2fa-redirect: fixed reset 2fa redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
jhagerman-bc committed Oct 25, 2024
1 parent 61ef7af commit 5749f79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/blockchain-wallet-v4-frontend/src/scenes/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const useFullPathForRedirect = [
'/wallet-options-v4.json',
'/#/prove',
'/#/reset-two-factor',
'/reset-two-factor',
'/#/open',
'/forgot-password',
'/import-wallet',
Expand Down Expand Up @@ -305,11 +306,17 @@ const App = ({

if (availableUI) {
// eslint-disable-next-line
console.log('Redirecting to v5', fullPathCaseSensitive)
console.log('xx', 'Redirecting to v5', fullPathCaseSensitive)
// Using **WALLET_V5_LINK** as a fallback for webpack builder.
if (useFullPathForRedirect.some((prefix) => fullPath.startsWith(prefix))) {
console.log(
'xx',
`${window?.WALLET_V5_LINK + removeHash(fullPathCaseSensitive)}`,
'using full path for redirect'
)
window.location.href = `${window?.WALLET_V5_LINK + removeHash(fullPathCaseSensitive)}`
} else {
console.log('xx', window?.WALLET_V5_LINK, 'not using full path for redirect')
window.location.href = window?.WALLET_V5_LINK
}

Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain-wallet-v4-frontend/webpackBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const buildWebpackConfig = (envConfig, extraPluginsList) => ({
// Note: using an obvious redirection issue
replacement: process.env.WALLET_V5_LINK
? process.env.WALLET_V5_LINK
: 'https://google.com'
: 'https://login-staging.blockchain.com/beta'
},
{
pattern: '**APP_VERSION**',
Expand Down

0 comments on commit 5749f79

Please sign in to comment.