Skip to content

Commit

Permalink
revert: revert remove wallet connect page (#8466)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeOMakinG authored Jan 6, 2025
1 parent 6a7679c commit 0c8668c
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 287 deletions.
22 changes: 12 additions & 10 deletions src/Routes/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ const Yat = makeSuspenseful(
const NotFound = makeSuspenseful(
lazy(() => import('pages/NotFound/NotFound').then(({ NotFound }) => ({ default: NotFound }))),
)
const ConnectWallet = makeSuspenseful(
lazy(() =>
import('pages/ConnectWallet/ConnectWallet').then(({ ConnectWallet }) => ({
default: ConnectWallet,
})),
),
)

const TermsOfService = makeSuspenseful(
lazy(() =>
import('pages/Legal/TermsOfService').then(({ TermsOfService }) => ({
Expand All @@ -42,6 +36,14 @@ const PrivacyPolicy = makeSuspenseful(
),
)

const MobileConnect = makeSuspenseful(
lazy(() =>
import('pages/ConnectWallet/MobileConnect').then(({ MobileConnect }) => ({
default: MobileConnect,
})),
),
)

export const Routes = memo(() => {
const dispatch = useDispatch()
const location = useLocation<{ background: Location }>()
Expand Down Expand Up @@ -105,7 +107,7 @@ export const Routes = memo(() => {

if (isMobile && !state.isConnected) {
const to = {
pathname: '/connect-wallet',
pathname: '/connect-mobile-wallet',
search: `returnUrl=${location?.pathname ?? '/trade'}`,
}

Expand Down Expand Up @@ -142,8 +144,8 @@ export const Routes = memo(() => {
<Route path='/yat/:eid'>
<Yat />
</Route>
<Route path='/connect-wallet'>
<ConnectWallet />
<Route path='/connect-mobile-wallet'>
<MobileConnect />
</Route>
<Route path={'/legal/terms-of-service'}>
<Layout>
Expand Down
Binary file removed src/assets/splash-sidebar.jpg
Binary file not shown.
13 changes: 0 additions & 13 deletions src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,21 +301,8 @@
"notSupported": "%{asset} is not supported by %{wallet}"
},
"connectWalletPage": {
"title": "The Original Multichain Exchange",
"primaryTitle": "Welcome to Multichain DeFi.",
"secondaryTitle": "Private. Decentralized. Non-custodial.",
"primaryDescription": "Trade, bridge, and earn rewards effortlessly. Experience Native Bitcoin, Dogecoin, and more. Manage Liquidity and DeFi Positions in One-Click.",
"snapDescription": "Download the ShapeShift Multichain Snap and Unlock Bitcoin, Dogecoin, and more for your MetaMask.",
"shapeshift": "ShapeShift",
"exploreThe": "Explore the",
"defiUniverse": "DeFi Universe",
"body": "Trade, bridge & earn. Private. Community owned. Non-custodial. Decentralized.",
"header": "Please connect a wallet to get started",
"cta": "Connect or Create Wallet",
"viewADemo": "View a Demo",
"dontHaveWallet": "Don't have a wallet?",
"welcomeBack": "Welcome back!",
"welcomeBody": "Connecting your wallet is like “logging in”. Select your wallet from the options to get started.",
"welcomeToShapeShift": "Welcome to ShapeShift",
"mobileWelcomeBody": "Create a brand new wallet or add an existing one to get started easily.",
"mobileSelectBody": "Select from any of your saved wallets below, or create or import a new wallet.",
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modals/Settings/ClearCache.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export const ClearCache = ({ appHistory }: ClearCacheProps) => {
await persistor.purge()
// send them back to the connect wallet route in case the bug was something to do with the current page
// and so they can reconnect their native wallet to avoid the app looking broken in an infinite loading state
appHistory.replace('/connect-wallet')
if (isMobileApp) {
appHistory.replace('/connect-mobile-wallet')
}
// reload the page
isMobileApp ? reloadWebview() : window.location.reload()
} catch (e) {}
Expand Down
2 changes: 1 addition & 1 deletion src/context/AppProvider/hooks/useAccountsFetchQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const useAccountsFetchQuery = () => {
isSnapInstalled,
},
],
queryFn: deviceId && !hasManagedAccounts ? queryFn : skipToken,
queryFn: wallet && deviceId && !hasManagedAccounts ? queryFn : skipToken,
})

return query
Expand Down
261 changes: 0 additions & 261 deletions src/pages/ConnectWallet/ConnectWallet.tsx

This file was deleted.

Loading

0 comments on commit 0c8668c

Please sign in to comment.