1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Created new route for connections (#20556)

* created new route for connections

* remove unnecessary code

* added connections component

* fixed connections route

* moved connections to pages in multichain

* moved connections route to multichain feature flag
This commit is contained in:
Nidhi Kumari 2023-08-29 22:08:29 +05:30 committed by GitHub
parent b8b94c2c1f
commit 215430236e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,5 @@
import React from 'react';
export const Connections = () => {
return <div></div>;
};

View File

@ -0,0 +1 @@
export { Connections } from './connections';

View File

@ -0,0 +1 @@
export { Connections } from './connections';

View File

@ -37,6 +37,7 @@ const INTERACTIVE_REPLACEMENT_TOKEN_PAGE =
'/interactive-replacement-token-page';
///: END:ONLY_INCLUDE_IN
const SEND_ROUTE = '/send';
const CONNECTIONS = '/connections';
const TOKEN_DETAILS = '/token-details';
const CONNECT_ROUTE = '/connect';
const CONNECT_CONFIRM_PERMISSIONS_ROUTE = '/confirm-permissions';
@ -145,6 +146,7 @@ const PATH_NAME_MAP = {
[INTERACTIVE_REPLACEMENT_TOKEN_PAGE]: 'Interactive replacement token page',
///: END:ONLY_INCLUDE_IN
[SEND_ROUTE]: 'Send Page',
[CONNECTIONS]: 'Connections',
[`${TOKEN_DETAILS}/:address`]: 'Token Details Page',
[`${CONNECT_ROUTE}/:id`]: 'Connect To Site Confirmation Page',
[`${CONNECT_ROUTE}/:id${CONNECT_CONFIRM_PERMISSIONS_ROUTE}`]:
@ -202,6 +204,7 @@ export {
CONFIRM_ADD_SUGGESTED_NFT_ROUTE,
CONNECT_HARDWARE_ROUTE,
SEND_ROUTE,
CONNECTIONS,
TOKEN_DETAILS,
CONFIRM_TRANSACTION_ROUTE,
CONFIRM_SEND_ETHER_PATH,

View File

@ -12,6 +12,7 @@ import SendTransactionScreen from '../send';
import Swaps from '../swaps';
import ConfirmTransaction from '../confirm-transaction';
import Home from '../home';
import { Connections } from '../../components/multichain/pages';
import Settings from '../settings';
import Authenticated from '../../helpers/higher-order-components/authenticated';
import Initialized from '../../helpers/higher-order-components/initialized';
@ -78,6 +79,7 @@ import {
ONBOARDING_ROUTE,
ONBOARDING_UNLOCK_ROUTE,
TOKEN_DETAILS,
CONNECTIONS,
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
INSTITUTIONAL_FEATURES_DONE_ROUTE,
CUSTODY_ACCOUNT_DONE_ROUTE,
@ -352,6 +354,9 @@ export default class Routes extends Component {
/>
///: END:ONLY_INCLUDE_IN
}
{process.env.MULTICHAIN && (
<Authenticated path={CONNECTIONS} component={Connections} />
)}
<Authenticated path={DEFAULT_ROUTE} component={Home} />
</Switch>
);