Skip to content

Commit

Permalink
Merge branch 'development' into feat/exchange-route-exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB authored Oct 29, 2024
2 parents 6487452 + 17ae1a8 commit db728dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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.101.8",
"version": "4.101.9",
"license": "AGPL-3.0-or-later",
"private": true,
"author": {
Expand Down
21 changes: 10 additions & 11 deletions packages/blockchain-wallet-v4-frontend/src/scenes/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,24 @@ const excludedProduction = [
'/exchange',
'/prove/instant-link/callback',
'/refer',
'/sofi',
// '/sofi',
'/#/verify-email',
'/#/login?product=exchange',
'/wallet-options-v4.json',
'/#/prove',
'/#/reset-two-factor',
'/#/open',
// '/#/reset-two-factor',
// '/#/open',
'/login?product=wallet&platform=ios',
'/login?product=wallet&platform=android',
'/signup/product=exchange&platform=ios',
'/signup/product=exchange&platform=android',
'/#/login?product=wallet&platform=ios',
'/#/login?product=wallet&platform=android',
'/#/signup/product=exchange&platform=ios',
'/#/login/',
'/#/signup/product=exchange&platform=android',
'/#/sofi',
'/#/login/'
// '/#/sofi'

]

const excludedStaging = [
Expand All @@ -155,7 +156,6 @@ const excludedStaging = [
// '/#/verify-email',
'/#/login?product=exchange',
'/wallet-options-v4.json',
'/#/prove',
// '/#/reset-two-factor'
// '/#/open',
'/login?product=wallet&platform=ios',
Expand Down Expand Up @@ -258,11 +258,8 @@ const App = ({
}

// IF ANY PATHS MATCH THE EXCLUSIONS, RENDER THE APP.
if (
(useStaging ? excludedStaging : excludedProduction).some((prefix) => {
return fullPath.startsWith(prefix)
})
) {
const exclusionPaths = useStaging ? excludedStaging : excludedProduction
if (exclusionPaths.some((prefix) => fullPath.startsWith(prefix))) {
setDynamicRoutingState(false)
return
}
Expand Down Expand Up @@ -311,13 +308,15 @@ const App = ({
console.log('xx', 'Redirecting to v5', fullPathCaseSensitive)
// Using **WALLET_V5_LINK** as a fallback for webpack builder.
if (useFullPathForRedirect.some((prefix) => fullPath.startsWith(prefix))) {
// eslint-disable-next-line
console.log(
'xx',
`${window?.WALLET_V5_LINK + removeHash(fullPathCaseSensitive)}`,
'using full path for redirect'
)
window.location.href = `${window?.WALLET_V5_LINK + removeHash(fullPathCaseSensitive)}`
} else {
// eslint-disable-next-line
console.log('xx', window?.WALLET_V5_LINK, 'not using full path for redirect')
window.location.href = window?.WALLET_V5_LINK
}
Expand Down

0 comments on commit db728dc

Please sign in to comment.