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

New wallet flow - re-consolidate routes in config #8596

Open
gomesalexandre opened this issue Jan 15, 2025 · 0 comments
Open

New wallet flow - re-consolidate routes in config #8596

gomesalexandre opened this issue Jan 15, 2025 · 0 comments

Comments

@gomesalexandre
Copy link
Contributor

Overview

Once we go live with new wallet flow, routes handling will need to be re-consolidated by leveraging

[KeyManager.Native]: {
...NativeConfig,
routes: [
{ path: NativeWalletRoutes.Connect, component: NativeStart },
{ path: NativeWalletRoutes.Load, component: NativeLoad },
{ path: NativeWalletRoutes.Password, component: NativePassword },
{ path: NativeWalletRoutes.Rename, component: NativeRename },
{ path: NativeWalletRoutes.ImportSelect, component: NativeImportSelect },
{ path: NativeWalletRoutes.ImportSeed, component: NativeImportSeed },
{ path: NativeWalletRoutes.ImportKeystore, component: NativeImportKeystore },
{ path: NativeWalletRoutes.Create, component: NativeCreate },
{ path: NativeWalletRoutes.CreateTest, component: NativeTestPhrase },
{ path: NativeWalletRoutes.Success, component: NativeSuccess },
{ path: NativeWalletRoutes.EnterPassword, component: EnterPassword },
{ path: NativeWalletRoutes.LegacyLogin, component: NativeLegacyLogin },
{ path: NativeWalletRoutes.LegacyLoginSuccess, component: NativeLegacySuccess },
],
connectedMenuComponent: NativeMenu,
},

Currently, routes in in <NewWalletViewsSwitch /> (or at least, that's where they're handled at the time of writing) are manually re-handled, because of styling issues, mostly:

<Route exact path='/metamask/connect'>
<MipdBody
rdns={modalType}
isLoading={isLoading}
error={error}
setIsLoading={setIsLoading}
setError={setError}
/>
</Route>
<Route path='/metamask/snap/install'>
<Flex height='full' alignItems='center'>
<Box width='full'>
<SnapInstall />
</Box>
</Flex>
</Route>
<Route path='/metamask/snap/update'>
<Flex height='full' alignItems='center'>
<Box width='full'>
<SnapUpdate />
</Box>
</Flex>
</Route>
<Route path='/'>
<MipdBody
rdns={modalType}
isLoading={isLoading}
error={error}
setIsLoading={setIsLoading}
setError={setError}
/>
</Route>
</Switch>

After we go live and delete previous wallet flow code, we'll be able to apply the style we want in each component, hence ensuring we don't produce any regression, and making it so that we don't have to reinvent the wheel and don't need to have another place with full-fledged routes handling logic.

References and additional details

N/A

Acceptance Criteria

  • Routes are handled in a single-place again after go-live
  • Dead code from previous components is removed

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant