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

fix/reset-2fa-redirect: fixed reset 2fa redirect #6497

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
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/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
Loading