Skip to content

Commit

Permalink
refactor: remove circular dependencies in `ui/pages/snap-account-redi…
Browse files Browse the repository at this point in the history
…rect/*` (#30279)

This PR solves an issue with circular dependencies. It does not change
the behavior of the application. It only rearranges functions/files to
avoid circular references.


<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.


## **Description**


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30279?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

### **Before**


### **After**

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
-->
  • Loading branch information
davidmurdoch authored Feb 19, 2025
1 parent 42bd11d commit 7b03791
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions development/circular-deps.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,5 @@
[
"ui/pages/notifications/notifications-list.tsx",
"ui/pages/notifications/notifications.tsx"
],
[
"ui/pages/snap-account-redirect/components/index.ts",
"ui/pages/snap-account-redirect/components/snap-account-redirect-context.tsx",
"ui/pages/snap-account-redirect/components/snap-account-redirect-message.tsx",
"ui/pages/snap-account-redirect/components/url-display-box.tsx",
"ui/pages/snap-account-redirect/snap-account-redirect.tsx"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ButtonVariant,
Text,
} from '../../../components/component-library';
import { SnapAccountRedirectProps } from '../snap-account-redirect';
import type { SnapAccountRedirectProps } from '../snap-account-redirect';
import {
AlignItems,
Display,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Display, TextVariant } from '../../../helpers/constants/design-system';
import { Box, Text } from '../../../components/component-library';
import { SnapAccountRedirectProps } from '../snap-account-redirect';
import type { SnapAccountRedirectProps } from '../snap-account-redirect';
import { SnapDelineator } from '../../../components/app/snaps/snap-delineator';
import UrlDisplayBox from './url-display-box';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { SnapAccountRedirectProps } from '../snap-account-redirect';
import type { SnapAccountRedirectProps } from '../snap-account-redirect';
import {
AlignItems,
BackgroundColor,
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/snap-account-redirect/snap-account-redirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
FlexDirection,
} from '../../helpers/constants/design-system';
import SnapAuthorshipHeader from '../../components/app/snaps/snap-authorship-header';
import { SnapAccountRedirectContent } from './components';
import SnapAccountRedirectContent from './components/snap-account-redirect-context';

export type SnapAccountRedirectProps = {
url: string;
Expand Down

0 comments on commit 7b03791

Please sign in to comment.