From 0ba409662e3ecd23421d9e810094a88c803bb249 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 13 Jul 2023 12:52:27 -0500 Subject: [PATCH 1/7] UX: Remove Portfolio from Token Overview Page (#19988) Co-authored-by: Nidhi Kumari --- .../app/wallet-overview/token-overview.js | 36 +--------------- .../wallet-overview/token-overview.test.js | 42 ------------------- 2 files changed, 1 insertion(+), 77 deletions(-) diff --git a/ui/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js index 0820c946a454..a605492b9d2a 100644 --- a/ui/components/app/wallet-overview/token-overview.js +++ b/ui/components/app/wallet-overview/token-overview.js @@ -28,7 +28,6 @@ import { INVALID_ASSET_TYPE } from '../../../helpers/constants/error-keys'; import { showModal } from '../../../store/actions'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { - MetaMetricsContextProp, MetaMetricsEventCategory, MetaMetricsEventName, MetaMetricsSwapsEventSource, @@ -36,12 +35,7 @@ import { import { AssetType } from '../../../../shared/constants/transaction'; import useRamps from '../../../hooks/experiences/useRamps'; -import { - ButtonIcon, - ButtonIconSize, - Icon, - IconName, -} from '../../component-library'; +import { Icon, IconName } from '../../component-library'; import { IconColor } from '../../../helpers/constants/design-system'; import { getPortfolioUrl } from '../../../helpers/utils/portfolio'; @@ -93,34 +87,6 @@ const TokenOverview = ({ className, token }) => { displayValue={balanceToRender} suffix={token.symbol} /> - { - const portfolioUrl = getPortfolioUrl('', 'ext', metaMetricsId); - global.platform.openTab({ - url: portfolioUrl, - }); - trackEvent( - { - category: MetaMetricsEventCategory.Home, - event: MetaMetricsEventName.PortfolioLinkClicked, - properties: { - url: portfolioUrl, - }, - }, - { - contextPropsIntoEventProperties: [ - MetaMetricsContextProp.PageTitle, - ], - }, - ); - }} - /> {formattedFiatBalance ? ( { ); }); - it('should always show the Portfolio button', () => { - const mockToken = { - name: 'test', - isERC721: false, - address: '0x7ceb23fd6bc0add59e62ac25578270cff1B9f619', - symbol: 'test', - }; - const { queryByTestId } = renderWithProvider( - , - store, - ); - const portfolioButton = queryByTestId('home__portfolio-site'); - expect(portfolioButton).toBeInTheDocument(); - }); - - it('should open the Portfolio URI when clicking on Portfolio button', async () => { - const mockToken = { - name: 'test', - isERC721: false, - address: '0x7ceb23fd6bc0add59e62ac25578270cff1B9f619', - symbol: 'test', - }; - const { queryByTestId } = renderWithProvider( - , - store, - ); - - const portfolioButton = queryByTestId('home__portfolio-site'); - - expect(portfolioButton).toBeInTheDocument(); - expect(portfolioButton).not.toBeDisabled(); - - fireEvent.click(portfolioButton); - expect(openTabSpy).toHaveBeenCalledTimes(1); - - await waitFor(() => - expect(openTabSpy).toHaveBeenCalledWith({ - url: expect.stringContaining(`?metamaskEntry=ext`), - }), - ); - }); - it('should show the Bridge button if chain id and token are supported', async () => { const mockToken = { name: 'test', From f17a841677c7b81a558fe238d6b79660a1c79c6d Mon Sep 17 00:00:00 2001 From: Nidhi Kumari Date: Thu, 13 Jul 2023 23:31:10 +0530 Subject: [PATCH 2/7] fixed button in wallet-overview (#19920) * fixed button in wallet-overview * lint fix * updated selector css with class --- ui/components/ui/icon-button/icon-button.js | 26 ++++++++++++++----- ui/components/ui/icon-button/icon-button.scss | 4 +++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ui/components/ui/icon-button/icon-button.js b/ui/components/ui/icon-button/icon-button.js index c6eb9062a181..cc95d8343cf1 100644 --- a/ui/components/ui/icon-button/icon-button.js +++ b/ui/components/ui/icon-button/icon-button.js @@ -28,13 +28,25 @@ export default function IconButton({ {renderWrapper( <>
{Icon}
- - {label.length > 12 ? ( - {label} - ) : ( - label - )} - + {label.length > 9 ? ( + + + {label} + + + ) : ( + + {label} + + )} , )} diff --git a/ui/components/ui/icon-button/icon-button.scss b/ui/components/ui/icon-button/icon-button.scss index 14c0a9eaf44d..e80854307fc7 100644 --- a/ui/components/ui/icon-button/icon-button.scss +++ b/ui/components/ui/icon-button/icon-button.scss @@ -29,4 +29,8 @@ opacity: 0.3; cursor: auto; } + + &__label { + width: 60px; //for ellipsis keeping the width same as icon-button used here + } } From 719d8a499b0cb557ec217a2c8fffd8b78315ef6c Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 13 Jul 2023 13:29:53 -0500 Subject: [PATCH 3/7] Fix #19941 - Correctly show network name and selection when chainIds collide (#19947) --- test/data/mock-state.json | 13 +++++- test/e2e/fixture-builder.js | 3 ++ test/e2e/tests/custom-rpc-history.spec.js | 10 +++-- .../__snapshots__/nft-details.test.js.snap | 2 +- .../app/nft-details/nft-details.test.js | 18 ++++++++- .../__snapshots__/app-header.test.js.snap | 4 +- .../network-list-menu/network-list-menu.js | 7 +++- ui/selectors/selectors.js | 13 +++++- ui/selectors/selectors.test.js | 40 +++++++++++++++++++ 9 files changed, 96 insertions(+), 14 deletions(-) diff --git a/test/data/mock-state.json b/test/data/mock-state.json index 07153cf85cfd..77d17841f66b 100644 --- a/test/data/mock-state.json +++ b/test/data/mock-state.json @@ -115,13 +115,22 @@ "type": "rpc", "chainId": "0x5", "ticker": "ETH", - "id": "testNetworkConfigurationId" + "id": "chain5" }, "networkConfigurations": { "testNetworkConfigurationId": { "rpcUrl": "https://testrpc.com", "chainId": "0x1", - "nickname": "Custom Mainnet RPC" + "nickname": "Custom Mainnet RPC", + "type": "rpc", + "id": "testNetworkConfigurationId" + }, + "chain5": { + "type": "rpc", + "chainId": "0x5", + "ticker": "ETH", + "nickname": "Chain 5", + "id": "chain5" } }, "keyrings": [ diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 884c9b94e8e0..bbbcd49cf42b 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -215,6 +215,7 @@ function defaultFixture() { rpcUrl: 'http://localhost:8545', ticker: 'ETH', type: 'rpc', + id: 'networkConfigurationId', }, networkConfigurations: { networkConfigurationId: { @@ -346,6 +347,7 @@ function onboardingFixture() { rpcUrl: 'http://localhost:8545', chainId: CHAIN_IDS.LOCALHOST, nickname: 'Localhost 8545', + id: 'networkConfigurationId', }, networkConfigurations: { networkConfigurationId: { @@ -355,6 +357,7 @@ function onboardingFixture() { rpcUrl: 'http://localhost:8545', ticker: 'ETH', networkConfigurationId: 'networkConfigurationId', + type: 'rpc', }, }, }, diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index 8b43ab712218..fd8e8314ba8e 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -196,19 +196,21 @@ describe('Stores custom RPC history', function () { fixtures: new FixtureBuilder() .withNetworkController({ networkConfigurations: { - networkConfigurationId: { + networkConfigurationIdOne: { rpcUrl: 'http://127.0.0.1:8545/1', chainId: '0x539', ticker: 'ETH', nickname: 'http://127.0.0.1:8545/1', rpcPrefs: {}, + type: 'rpc', }, - networkConfigurationId2: { + networkConfigurationIdTwo: { rpcUrl: 'http://127.0.0.1:8545/2', chainId: '0x539', ticker: 'ETH', nickname: 'http://127.0.0.1:8545/2', rpcPrefs: {}, + type: 'rpc', }, }, }) @@ -248,14 +250,14 @@ describe('Stores custom RPC history', function () { fixtures: new FixtureBuilder() .withNetworkController({ networkConfigurations: { - networkConfigurationId: { + networkConfigurationIdOne: { rpcUrl: 'http://127.0.0.1:8545/1', chainId: '0x539', ticker: 'ETH', nickname: 'http://127.0.0.1:8545/1', rpcPrefs: {}, }, - networkConfigurationId2: { + networkConfigurationIdTwo: { rpcUrl: 'http://127.0.0.1:8545/2', chainId: '0x539', ticker: 'ETH', diff --git a/ui/components/app/nft-details/__snapshots__/nft-details.test.js.snap b/ui/components/app/nft-details/__snapshots__/nft-details.test.js.snap index 6be92d2bdf84..ec9fd7afe945 100644 --- a/ui/components/app/nft-details/__snapshots__/nft-details.test.js.snap +++ b/ui/components/app/nft-details/__snapshots__/nft-details.test.js.snap @@ -66,7 +66,7 @@ exports[`NFT Details should match minimal props and state snapshot 1`] = ` class="box mm-text mm-avatar-base mm-avatar-base--size-sm mm-avatar-network nft-item__network-badge mm-text--body-sm mm-text--text-transform-uppercase box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--color-text-default box--background-color-background-alternative box--rounded-full box--border-color-background-default box--border-width-2 box--border-style-solid" data-testid="nft-network-badge" > - G + C diff --git a/ui/components/app/nft-details/nft-details.test.js b/ui/components/app/nft-details/nft-details.test.js index 3909406b2458..aab54bd60e06 100644 --- a/ui/components/app/nft-details/nft-details.test.js +++ b/ui/components/app/nft-details/nft-details.test.js @@ -13,6 +13,12 @@ import { removeAndIgnoreNft, setRemoveNftMessage, } from '../../../store/actions'; +import { + CHAIN_IDS, + CURRENCY_SYMBOLS, + MAINNET_DISPLAY_NAME, + NETWORK_TYPES, +} from '../../../../shared/constants/network'; import NftDetails from './nft-details'; jest.mock('copy-to-clipboard'); @@ -172,7 +178,10 @@ describe('NFT Details', () => { metamask: { ...mockState.metamask, providerConfig: { - chainId: '0x1', + chainId: CHAIN_IDS.MAINNET, + type: NETWORK_TYPES.MAINNET, + ticker: CURRENCY_SYMBOLS.ETH, + nickname: MAINNET_DISPLAY_NAME, }, }, }; @@ -203,12 +212,16 @@ describe('NFT Details', () => { ...mockState.metamask, providerConfig: { chainId: '0x89', + type: 'rpc', + id: 'custom-mainnet', }, networkConfigurations: { testNetworkConfigurationId: { rpcUrl: 'https://testrpc.com', chainId: '0x89', nickname: 'Custom Mainnet RPC', + type: 'rpc', + id: 'custom-mainnet', }, }, }, @@ -239,7 +252,8 @@ describe('NFT Details', () => { metamask: { ...mockState.metamask, providerConfig: { - chainId: '0xaa36a7', + chainId: CHAIN_IDS.SEPOLIA, + type: NETWORK_TYPES.SEPOLIA, }, }, }; diff --git a/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap b/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap index 2a52b214fd8f..a547951d2f0b 100644 --- a/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap +++ b/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap @@ -214,12 +214,12 @@ exports[`App Header should match snapshot 1`] = `
- G + C

- Goerli + Chain 5

{ const showTestNetworks = useSelector(getShowTestNetworks); const currentChainId = useSelector(getCurrentChainId); + + const currentNetwork = useSelector(getCurrentNetwork); + const dispatch = useDispatch(); const history = useHistory(); const trackEvent = useContext(MetaMetricsContext); @@ -76,7 +80,8 @@ export const NetworkListMenu = ({ onClose }) => { if (!lineaMainnetReleased && network.providerType === 'linea-mainnet') { return null; } - const isCurrentNetwork = currentChainId === network.chainId; + const isCurrentNetwork = currentNetwork.id === network.id; + const canDeleteNetwork = !isCurrentNetwork && !UNREMOVABLE_CHAIN_IDS.includes(network.chainId); diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index b05b2c5e0f12..8707d26f9038 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1170,9 +1170,13 @@ export function getNetworkConfigurations(state) { export function getCurrentNetwork(state) { const allNetworks = getAllNetworks(state); - const currentChainId = getCurrentChainId(state); + const providerConfig = getProviderConfig(state); - return allNetworks.find((network) => network.chainId === currentChainId); + const filter = + providerConfig.type === 'rpc' + ? (network) => network.id === providerConfig.id + : (network) => network.id === providerConfig.type; + return allNetworks.find(filter); } export function getAllEnabledNetworks(state) { @@ -1193,6 +1197,7 @@ export function getTestNetworks(state) { rpcUrl: CHAIN_ID_TO_RPC_URL_MAP[CHAIN_IDS.GOERLI], providerType: NETWORK_TYPES.GOERLI, ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.GOERLI], + id: NETWORK_TYPES.GOERLI, }, { chainId: CHAIN_IDS.SEPOLIA, @@ -1200,6 +1205,7 @@ export function getTestNetworks(state) { rpcUrl: CHAIN_ID_TO_RPC_URL_MAP[CHAIN_IDS.SEPOLIA], providerType: NETWORK_TYPES.SEPOLIA, ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.SEPOLIA], + id: NETWORK_TYPES.SEPOLIA, }, { chainId: CHAIN_IDS.LINEA_GOERLI, @@ -1210,6 +1216,7 @@ export function getTestNetworks(state) { }, providerType: NETWORK_TYPES.LINEA_GOERLI, ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.LINEA_GOERLI], + id: NETWORK_TYPES.LINEA_GOERLI, }, // Localhosts ...Object.values(networkConfigurations).filter( @@ -1232,6 +1239,7 @@ export function getNonTestNetworks(state) { }, providerType: NETWORK_TYPES.MAINNET, ticker: CURRENCY_SYMBOLS.ETH, + id: NETWORK_TYPES.MAINNET, }, { chainId: CHAIN_IDS.LINEA_MAINNET, @@ -1242,6 +1250,7 @@ export function getNonTestNetworks(state) { }, providerType: NETWORK_TYPES.LINEA_MAINNET, ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.LINEA_MAINNET], + id: NETWORK_TYPES.LINEA_MAINNET, }, // Custom networks added by the user ...Object.values(networkConfigurations).filter( diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js index 1442528f9008..e63252ee70e7 100644 --- a/ui/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -316,6 +316,46 @@ describe('Selectors', () => { }); }); + describe('#getCurrentNetwork', () => { + it('returns the correct custom network when there is a chainId collision', () => { + const modifiedMockState = { + ...mockState, + metamask: { + ...mockState.metamask, + providerConfig: { + ...mockState.metamask.networkConfigurations + .testNetworkConfigurationId, + // 0x1 would collide with Ethereum Mainnet + chainId: '0x1', + // type of "rpc" signals custom network + type: 'rpc', + }, + }, + }; + + const currentNetwork = selectors.getCurrentNetwork(modifiedMockState); + expect(currentNetwork.nickname).toBe('Custom Mainnet RPC'); + expect(currentNetwork.chainId).toBe('0x1'); + }); + + it('returns the correct mainnet network when there is a chainId collision', () => { + const modifiedMockState = { + ...mockState, + metamask: { + ...mockState.metamask, + providerConfig: { + ...mockState.metamask.providerConfig, + chainId: '0x1', + // Changing type to 'mainnet' represents Ethereum Mainnet + type: 'mainnet', + }, + }, + }; + const currentNetwork = selectors.getCurrentNetwork(modifiedMockState); + expect(currentNetwork.nickname).toBe('Ethereum Mainnet'); + }); + }); + describe('#getAllEnabledNetworks', () => { it('returns only Mainnet and Linea with showTestNetworks off', () => { const networks = selectors.getAllEnabledNetworks({ From 090476d9a27ca712c90e813e91f94d00504e5015 Mon Sep 17 00:00:00 2001 From: Garrett Bear Date: Thu, 13 Jul 2023 13:22:40 -0700 Subject: [PATCH 4/7] ButtonIcon background & ButtonBase disabled update (#19976) * button background hover updates * add buttonlink underline * update button base disabled * fix size auto * Update ui/components/component-library/button-link/button-link.stories.js Co-authored-by: George Marshall * remove underline --------- Co-authored-by: George Marshall --- .../button-base/button-base.scss | 2 +- .../button-icon/button-icon.scss | 21 +++++++-- .../button-icon/button-icon.stories.tsx | 46 ++++++++++--------- .../button-icon/button-icon.test.tsx | 9 ++++ .../button-icon/button-icon.tsx | 5 +- .../button-icon/button-icon.types.ts | 1 + .../button-link/button-link.scss | 21 +++------ .../component-library-components.scss | 6 +++ 8 files changed, 67 insertions(+), 44 deletions(-) diff --git a/ui/components/component-library/button-base/button-base.scss b/ui/components/component-library/button-base/button-base.scss index 6b4e249c2542..97115a11609e 100644 --- a/ui/components/component-library/button-base/button-base.scss +++ b/ui/components/component-library/button-base/button-base.scss @@ -33,7 +33,7 @@ &--disabled, &:disabled { - opacity: 0.3; + opacity: var(--opacity-disabled); cursor: not-allowed; } diff --git a/ui/components/component-library/button-icon/button-icon.scss b/ui/components/component-library/button-icon/button-icon.scss index 3658d65905df..e42f1dd1e46c 100644 --- a/ui/components/component-library/button-icon/button-icon.scss +++ b/ui/components/component-library/button-icon/button-icon.scss @@ -1,7 +1,5 @@ .mm-button-icon { --button-icon-size: var(--size, 24px); - --button-icon-opacity-hover: 0.5; // TODO: replace with design tokens - --button-icon-opacity-disabled: 0.3; // TODO: replace with design tokens height: var(--button-icon-size); width: var(--button-icon-size); @@ -9,15 +7,24 @@ cursor: pointer; // ButtonIcon default states - &:active, + &:hover { - opacity: var(--button-icon-opacity-hover); + background-color: var(--color-background-hover); + } + + &:active { + background-color: var(--color-background-pressed); } &--disabled, &:disabled { - opacity: var(--button-icon-opacity-disabled); + opacity: var(--opacity-disabled); cursor: not-allowed; + + &:hover, + &:active { + background-color: transparent; + } } // ButtonIcon Sizes @@ -25,6 +32,10 @@ --button-icon-size: 24px; } + &--size-md { + --button-icon-size: 28px; + } + &--size-lg { --button-icon-size: 32px; } diff --git a/ui/components/component-library/button-icon/button-icon.stories.tsx b/ui/components/component-library/button-icon/button-icon.stories.tsx index d9afbca056c8..927faa8e72fd 100644 --- a/ui/components/component-library/button-icon/button-icon.stories.tsx +++ b/ui/components/component-library/button-icon/button-icon.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { ComponentStory, ComponentMeta } from '@storybook/react'; -import { Color } from '../../../helpers/constants/design-system'; +import { StoryFn, Meta } from '@storybook/react'; +import { IconColor } from '../../../helpers/constants/design-system'; import { IconName } from '..'; import { ButtonIconSize } from './button-icon.types'; import { ButtonIcon } from './button-icon'; @@ -21,11 +21,9 @@ export default { options: ['button', 'a'], }, }, -} as ComponentMeta; +} as Meta; -const Template: ComponentStory = (args) => ( - -); +const Template: StoryFn = (args) => ; export const DefaultStory = Template.bind({}); @@ -36,7 +34,7 @@ DefaultStory.args = { DefaultStory.storyName = 'Default'; -export const IconNameStory: ComponentStory = (args) => ( +export const IconNameStory: StoryFn = (args) => ( ); @@ -47,7 +45,7 @@ IconNameStory.args = { IconNameStory.storyName = 'IconName'; -export const SizeStory: ComponentStory = (args) => ( +export const SizeStory: StoryFn = (args) => ( <> = (args) => ( iconName={IconName.Close} ariaLabel="Close" /> + @@ -67,60 +71,60 @@ export const SizeStory: ComponentStory = (args) => ( SizeStory.storyName = 'Size'; -export const AriaLabel: ComponentStory = (args) => ( +export const AriaLabel: StoryFn = (args) => ( <> ); -export const As: ComponentStory = (args) => ( +export const As: StoryFn = (args) => ( <> ); -export const Href: ComponentStory = (args) => ( - +export const Href: StoryFn = (args) => ( + ); Href.args = { ariaLabel: 'Visit Metamask.io', href: 'https://metamask.io/', - color: Color.primaryDefault, + color: IconColor.primaryDefault, }; -export const ColorStory: ComponentStory = (args) => ( +export const ColorStory: StoryFn = (args) => ( ); ColorStory.storyName = 'Color'; ColorStory.args = { - color: Color.primaryDefault, + color: IconColor.primaryDefault, }; -export const Disabled: ComponentStory = (args) => ( +export const Disabled: StoryFn = (args) => ( ); diff --git a/ui/components/component-library/button-icon/button-icon.test.tsx b/ui/components/component-library/button-icon/button-icon.test.tsx index 1b4ae6a9390b..c146e169454a 100644 --- a/ui/components/component-library/button-icon/button-icon.test.tsx +++ b/ui/components/component-library/button-icon/button-icon.test.tsx @@ -56,6 +56,12 @@ describe('ButtonIcon', () => { size={ButtonIconSize.Sm} data-testid={ButtonIconSize.Sm} /> + { expect(getByTestId(ButtonIconSize.Sm)).toHaveClass( `mm-button-icon--size-${ButtonIconSize.Sm}`, ); + expect(getByTestId(ButtonIconSize.Md)).toHaveClass( + `mm-button-icon--size-${ButtonIconSize.Md}`, + ); expect(getByTestId(ButtonIconSize.Lg)).toHaveClass( `mm-button-icon--size-${ButtonIconSize.Lg}`, ); diff --git a/ui/components/component-library/button-icon/button-icon.tsx b/ui/components/component-library/button-icon/button-icon.tsx index 3831cb838f45..36713dbe6ccc 100644 --- a/ui/components/component-library/button-icon/button-icon.tsx +++ b/ui/components/component-library/button-icon/button-icon.tsx @@ -5,7 +5,7 @@ import { AlignItems, BackgroundColor, BorderRadius, - DISPLAY, + Display, IconColor, JustifyContent, } from '../../../helpers/constants/design-system'; @@ -17,6 +17,7 @@ import { ButtonIconSize, ButtonIconProps } from './button-icon.types'; const buttonIconSizeToIconSize: Record = { [ButtonIconSize.Sm]: IconSize.Sm, + [ButtonIconSize.Md]: IconSize.Md, [ButtonIconSize.Lg]: IconSize.Lg, }; @@ -52,7 +53,7 @@ export const ButtonIcon = React.forwardRef( )} color={color} {...(isDisabled ? { disabled: true } : {})} // only allow disabled attribute to be passed down to the Box when the as prop is equal to a button element - display={DISPLAY.INLINE_FLEX} + display={Display.InlineFlex} justifyContent={JustifyContent.center} alignItems={AlignItems.center} borderRadius={BorderRadius.LG} diff --git a/ui/components/component-library/button-icon/button-icon.types.ts b/ui/components/component-library/button-icon/button-icon.types.ts index d50d4cd85c1a..70250075dc8d 100644 --- a/ui/components/component-library/button-icon/button-icon.types.ts +++ b/ui/components/component-library/button-icon/button-icon.types.ts @@ -5,6 +5,7 @@ import { IconColor } from '../../../helpers/constants/design-system'; export enum ButtonIconSize { Sm = 'sm', + Md = 'md', Lg = 'lg', } diff --git a/ui/components/component-library/button-link/button-link.scss b/ui/components/component-library/button-link/button-link.scss index 30e40042c672..9d68e42d8860 100644 --- a/ui/components/component-library/button-link/button-link.scss +++ b/ui/components/component-library/button-link/button-link.scss @@ -1,36 +1,27 @@ -.mm-button-link { - &:hover { - opacity: 0.5; - } +.mm-button-link { &:active { - opacity: 0.5; + color: var(--color-primary-alternative); } &--disabled { - &:hover { - opacity: 0.3; - } - &:active { - opacity: 0.3; + color: var(--color-primary-default); } } &--type-danger { &:hover { color: var(--color-error-default); - opacity: 0.5; } &:active { - color: var(--color-error-default); - opacity: 0.5; + color: var(--color-error-alternative); } } - &--type-danger#{&}--disabled:hover { - opacity: 0.3; + &--type-danger#{&}--disabled:active { + color: var(--color-error-default); } &--size-auto { diff --git a/ui/components/component-library/component-library-components.scss b/ui/components/component-library/component-library-components.scss index 68f1085c9ce6..d03fb28f10b9 100644 --- a/ui/components/component-library/component-library-components.scss +++ b/ui/components/component-library/component-library-components.scss @@ -4,6 +4,12 @@ * This will help improve specificity and reduce the chance of * unintended overrides. **/ + +// Temp CSS Variables +:root { + --opacity-disabled: 0.5; +} + // Atoms @import 'box/box'; @import 'text/text'; From 0917b7c52f993373053b36e10ab6a13e8f50e527 Mon Sep 17 00:00:00 2001 From: Ariella Vu <20778143+digiwand@users.noreply.github.com> Date: Thu, 13 Jul 2023 22:38:42 +0200 Subject: [PATCH 5/7] Add alternative summary UI with arrow icon to the Disclosure component (#19770) * disclosure: add isArrowSummary option w/ UI * disclosure.scss: add missing trailing semicolon * Disclosure: replace isArrowSummary -> type prop * Disclosure: alphabetize props * Disclosure: add cursor: pointer * storybook: add Disclosure - Type Arrow * Disclosure: margin-left: 0 arrow type content * Disclosure: fix margin-left: 0 arrow type * Disclosure: support Text media query for Arrow * Disclosure: clean rn type -> variant * Disclosure: use size prop for arrow summary text * Disclosure: update rest of type -> variant * Disclosure: 1 more type -> variant * Disclosure: TypeArrow -> VariantArrow --- .../ui/disclosure/disclosure.constants.ts | 4 ++ ui/components/ui/disclosure/disclosure.js | 63 +++++++++++++++---- ui/components/ui/disclosure/disclosure.scss | 28 +++++++++ .../ui/disclosure/disclosure.stories.js | 18 ++++-- 4 files changed, 97 insertions(+), 16 deletions(-) create mode 100644 ui/components/ui/disclosure/disclosure.constants.ts diff --git a/ui/components/ui/disclosure/disclosure.constants.ts b/ui/components/ui/disclosure/disclosure.constants.ts new file mode 100644 index 000000000000..4326545defb4 --- /dev/null +++ b/ui/components/ui/disclosure/disclosure.constants.ts @@ -0,0 +1,4 @@ +export enum DisclosureVariant { + Default = 'default', + Arrow = 'arrow', +} diff --git a/ui/components/ui/disclosure/disclosure.js b/ui/components/ui/disclosure/disclosure.js index e2074630824c..297646c0956a 100644 --- a/ui/components/ui/disclosure/disclosure.js +++ b/ui/components/ui/disclosure/disclosure.js @@ -1,9 +1,53 @@ import React, { useState, useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { Icon, IconName, IconSize } from '../../component-library'; +import { Icon, IconName, IconSize, Text } from '../../component-library'; +import { Color, TextVariant } from '../../../helpers/constants/design-system'; +import { DisclosureVariant } from './disclosure.constants'; -const Disclosure = ({ children, title, size }) => { +/** + * @param {string} variant + * @param {string} title + * @param {string} size + * @returns {JSX.Element} + */ +const renderSummaryByType = (variant, title, size) => { + switch (variant) { + case DisclosureVariant.Arrow: { + const textVariant = + size === 'small' ? TextVariant.bodySm : TextVariant.bodyMd; + + return ( + + + {title} + + + + ); + } + default: + return ( + + + {title} + + ); + } +}; + +const Disclosure = ({ children, title, size, variant }) => { const disclosureFooterEl = useRef(null); const [open, setOpen] = useState(false); @@ -23,15 +67,8 @@ const Disclosure = ({ children, title, size }) => {
setOpen((state) => !state)}> {title ? (
- - - {title} - + {renderSummaryByType(variant, title)} +
{children}
@@ -46,13 +83,15 @@ const Disclosure = ({ children, title, size }) => { Disclosure.propTypes = { children: PropTypes.node.isRequired, - title: PropTypes.string, size: PropTypes.string, + title: PropTypes.string, + variant: PropTypes.string, }; Disclosure.defaultProps = { size: 'normal', title: null, + variant: DisclosureVariant.Default, }; export default Disclosure; diff --git a/ui/components/ui/disclosure/disclosure.scss b/ui/components/ui/disclosure/disclosure.scss index 06b9044b10cf..179de33dbeef 100644 --- a/ui/components/ui/disclosure/disclosure.scss +++ b/ui/components/ui/disclosure/disclosure.scss @@ -7,6 +7,7 @@ padding-bottom: 10px; font-weight: bold; display: flex; + cursor: pointer; &::-webkit-details-marker, &::marker { @@ -23,4 +24,31 @@ font-size: 12px; } } + + // Arrow Summary + + details[open] { + .disclosure__summary.is-arrow .disclosure__summary--icon { + transform: rotateX(0deg); + } + } + + &__summary.is-arrow { + display: flex; + align-items: center; + font-weight: normal; + + &:hover { + opacity: 0.5; + } + + + .disclosure__content { + margin-left: 0; + } + + .disclosure__summary--icon { + transform: rotateX(180deg); + transition: 0.1s transform; + } + } } diff --git a/ui/components/ui/disclosure/disclosure.stories.js b/ui/components/ui/disclosure/disclosure.stories.js index 708ab5ed40da..6b091528da59 100644 --- a/ui/components/ui/disclosure/disclosure.stories.js +++ b/ui/components/ui/disclosure/disclosure.stories.js @@ -1,4 +1,5 @@ import React from 'react'; +import { DisclosureVariant } from './disclosure.constants'; import Disclosure from '.'; export default { @@ -8,20 +9,29 @@ export default { children: { control: 'text', }, - title: { + size: { control: 'text', }, - size: { + title: { control: 'text', }, + variant: { + control: { + type: 'select', + }, + options: [...Object.values(DisclosureVariant)], + }, }, args: { - title: 'title', children: 'hello world', size: 'normal', + title: 'title', }, }; export const DefaultStory = (args) => ; - DefaultStory.storyName = 'Default'; + +export const VariantArrow = (args) => ( + +); From 3ef2faf41c46fa7b1bb61b3f31cbb92406abdf67 Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Thu, 13 Jul 2023 13:49:13 -0700 Subject: [PATCH 6/7] fix(clipboard): Increase DEFAULT copy to clipboard time (#20008) --- ui/hooks/useCopyToClipboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/hooks/useCopyToClipboard.js b/ui/hooks/useCopyToClipboard.js index 8f6384ac0776..2aead9976c06 100644 --- a/ui/hooks/useCopyToClipboard.js +++ b/ui/hooks/useCopyToClipboard.js @@ -1,6 +1,6 @@ import { useState, useCallback } from 'react'; import copyToClipboard from 'copy-to-clipboard'; -import { SECOND } from '../../shared/constants/time'; +import { MINUTE } from '../../shared/constants/time'; import { useTimeout } from './useTimeout'; /** @@ -9,7 +9,7 @@ import { useTimeout } from './useTimeout'; * @param {number} [delay=3000] - delay in ms * @returns {[boolean, Function]} */ -const DEFAULT_DELAY = SECOND * 3; +const DEFAULT_DELAY = MINUTE; export function useCopyToClipboard(delay = DEFAULT_DELAY) { const [copied, setCopied] = useState(false); From 751120bd014b2dce478a97f8547b5567eefdc38d Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Thu, 13 Jul 2023 16:57:31 -0600 Subject: [PATCH 7/7] Restore support for Linea networks (#20011) When the NetworkController in this repo was replaced with `@metamask/network-controller`, support for Linea networks was lost as it did not support it at that time. `@metamask/network-controller` has since been updated, so this commit bumps that package to restore support. --- .iyarc | 4 ++ lavamoat/browserify/beta/policy.json | 22 +------- lavamoat/browserify/desktop/policy.json | 22 +------- lavamoat/browserify/flask/policy.json | 22 +------- lavamoat/browserify/main/policy.json | 22 +------- lavamoat/browserify/mmi/policy.json | 22 +------- package.json | 4 +- yarn.lock | 71 +++++++++++-------------- 8 files changed, 43 insertions(+), 146 deletions(-) diff --git a/.iyarc b/.iyarc index 9e16de044ef3..2b0adcf36b12 100644 --- a/.iyarc +++ b/.iyarc @@ -9,3 +9,7 @@ GHSA-p8p7-x288-28g6 # Not easily patched # Minimal risk to us because we're using lockdown which also prevents this case of prototype pollution GHSA-h755-8qp9-cq85 + +# tough-cookie +# this will go away soon when we get rid of web3-provider-engine +GHSA-72xf-g2v4-qvf3 diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index d0c93d30175c..a23f68f9b819 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1624,7 +1624,7 @@ }, "packages": { "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "@metamask/network-controller>@metamask/eth-json-rpc-provider": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true @@ -1642,26 +1642,6 @@ "superstruct": true } }, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { - "globals": { - "URL": true, - "btoa": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true, - "@metamask/safe-event-emitter": true, - "browserify>browser-resolve": true, - "eth-rpc-errors": true, - "json-rpc-engine": true, - "lavamoat>json-stable-stringify": true, - "vinyl>clone": true - } - }, "@metamask/network-controller>@metamask/eth-json-rpc-provider": { "packages": { "@metamask/safe-event-emitter": true, diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index e9133848be38..4c80538b4e4f 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -1750,7 +1750,7 @@ }, "packages": { "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "@metamask/network-controller>@metamask/eth-json-rpc-provider": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true @@ -1768,26 +1768,6 @@ "superstruct": true } }, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { - "globals": { - "URL": true, - "btoa": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true, - "@metamask/safe-event-emitter": true, - "browserify>browser-resolve": true, - "eth-rpc-errors": true, - "json-rpc-engine": true, - "lavamoat>json-stable-stringify": true, - "vinyl>clone": true - } - }, "@metamask/network-controller>@metamask/eth-json-rpc-provider": { "packages": { "@metamask/safe-event-emitter": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index e9133848be38..4c80538b4e4f 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1750,7 +1750,7 @@ }, "packages": { "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "@metamask/network-controller>@metamask/eth-json-rpc-provider": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true @@ -1768,26 +1768,6 @@ "superstruct": true } }, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { - "globals": { - "URL": true, - "btoa": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true, - "@metamask/safe-event-emitter": true, - "browserify>browser-resolve": true, - "eth-rpc-errors": true, - "json-rpc-engine": true, - "lavamoat>json-stable-stringify": true, - "vinyl>clone": true - } - }, "@metamask/network-controller>@metamask/eth-json-rpc-provider": { "packages": { "@metamask/safe-event-emitter": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index d0c93d30175c..a23f68f9b819 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1624,7 +1624,7 @@ }, "packages": { "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "@metamask/network-controller>@metamask/eth-json-rpc-provider": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true @@ -1642,26 +1642,6 @@ "superstruct": true } }, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { - "globals": { - "URL": true, - "btoa": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true, - "@metamask/safe-event-emitter": true, - "browserify>browser-resolve": true, - "eth-rpc-errors": true, - "json-rpc-engine": true, - "lavamoat>json-stable-stringify": true, - "vinyl>clone": true - } - }, "@metamask/network-controller>@metamask/eth-json-rpc-provider": { "packages": { "@metamask/safe-event-emitter": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index c2c8c36c13fa..d198cb95070b 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1852,7 +1852,7 @@ }, "packages": { "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "@metamask/network-controller>@metamask/eth-json-rpc-provider": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true @@ -1870,26 +1870,6 @@ "superstruct": true } }, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { - "globals": { - "URL": true, - "btoa": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true, - "@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true, - "@metamask/safe-event-emitter": true, - "browserify>browser-resolve": true, - "eth-rpc-errors": true, - "json-rpc-engine": true, - "lavamoat>json-stable-stringify": true, - "vinyl>clone": true - } - }, "@metamask/network-controller>@metamask/eth-json-rpc-provider": { "packages": { "@metamask/safe-event-emitter": true, diff --git a/package.json b/package.json index 9a6ee69c58ce..942832714ca2 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "@metamask/base-controller": "^3.1.0", "@metamask/browser-passworder": "^4.1.0", "@metamask/contract-metadata": "^2.3.1", - "@metamask/controller-utils": "^4.1.0", + "@metamask/controller-utils": "^4.2.0", "@metamask/design-tokens": "^1.12.0", "@metamask/desktop": "^0.3.0", "@metamask/eth-json-rpc-middleware": "^11.0.0", @@ -248,7 +248,7 @@ "@metamask/logo": "^3.1.1", "@metamask/message-manager": "^7.0.2", "@metamask/metamask-eth-abis": "^3.0.0", - "@metamask/network-controller": "^10.3.0", + "@metamask/network-controller": "^10.3.1", "@metamask/notification-controller": "^3.0.0", "@metamask/obs-store": "^8.1.0", "@metamask/permission-controller": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 60ddf503ae96..b4ca89b1901f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4027,9 +4027,9 @@ __metadata: languageName: node linkType: hard -"@metamask/controller-utils@npm:^4.0.0, @metamask/controller-utils@npm:^4.0.1, @metamask/controller-utils@npm:^4.1.0": - version: 4.1.0 - resolution: "@metamask/controller-utils@npm:4.1.0" +"@metamask/controller-utils@npm:^4.0.0, @metamask/controller-utils@npm:^4.0.1, @metamask/controller-utils@npm:^4.1.0, @metamask/controller-utils@npm:^4.2.0": + version: 4.2.0 + resolution: "@metamask/controller-utils@npm:4.2.0" dependencies: "@metamask/utils": ^5.0.2 "@spruceid/siwe-parser": 1.1.3 @@ -4040,7 +4040,7 @@ __metadata: ethereumjs-util: ^7.0.10 ethjs-unit: ^0.1.6 fast-deep-equal: ^3.1.3 - checksum: b4975e6ca860b691931254aa749e8c4faddd04279609cf197155b38150e55da0e966bf9b2d61ee1cd070f79d16e0305d5a0ff1747e0b4ab2e1c3ab46ca84e4d7 + checksum: e71779577c37038e6e605a43ef6b9c1af82e0b3887a72c01f48ae1e4e2005116fc9d09c8b690139478c04dd2929e227642c5fd80cfbc81814d667c415c714228 languageName: node linkType: hard @@ -4141,16 +4141,16 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-json-rpc-infura@npm:^8.0.0": - version: 8.1.0 - resolution: "@metamask/eth-json-rpc-infura@npm:8.1.0" +"@metamask/eth-json-rpc-infura@npm:^8.1.0": + version: 8.1.1 + resolution: "@metamask/eth-json-rpc-infura@npm:8.1.1" dependencies: - "@metamask/utils": ^3.0.1 - eth-json-rpc-middleware: ^9.0.0 + "@metamask/eth-json-rpc-provider": ^1.0.0 + "@metamask/utils": ^4.0.0 eth-rpc-errors: ^4.0.3 json-rpc-engine: ^6.1.0 node-fetch: ^2.6.7 - checksum: fd09383e2b3c16187b8889b53bfc431fc7ea4f6483acc23ddf77f2fd771ad0fbff41d6a62d4b05833e7cda66adafe0cb3730d7c0e9575b89683b71a82ab1ee1f + checksum: ab4ce53fcc1586344824d58aed4d71412b015466f697758b4849e186038ae1730c9765935dfaf1a9131ff1a8f0f36dcb66fd50355ed95ac7a4bf0bc18c4c2696 languageName: node linkType: hard @@ -4398,13 +4398,13 @@ __metadata: languageName: node linkType: hard -"@metamask/network-controller@npm:^10.2.0, @metamask/network-controller@npm:^10.3.0": - version: 10.3.0 - resolution: "@metamask/network-controller@npm:10.3.0" +"@metamask/network-controller@npm:^10.2.0, @metamask/network-controller@npm:^10.3.0, @metamask/network-controller@npm:^10.3.1": + version: 10.3.1 + resolution: "@metamask/network-controller@npm:10.3.1" dependencies: - "@metamask/base-controller": ^3.0.0 - "@metamask/controller-utils": ^4.1.0 - "@metamask/eth-json-rpc-infura": ^8.0.0 + "@metamask/base-controller": ^3.1.0 + "@metamask/controller-utils": ^4.2.0 + "@metamask/eth-json-rpc-infura": ^8.1.0 "@metamask/eth-json-rpc-middleware": ^11.0.0 "@metamask/eth-json-rpc-provider": ^1.0.0 "@metamask/swappable-obj-proxy": ^2.1.0 @@ -4417,7 +4417,7 @@ __metadata: immer: ^9.0.6 json-rpc-engine: ^6.1.0 uuid: ^8.3.2 - checksum: 0c48625af9c18be3ed2a433209db770bab02e667e251be1ef4c1f61a62c25907536ff740712bdfd799ac923a4a6bb9df5430ead8d4215507bbf30dcc7a40d53c + checksum: 62adb90b02eae1236f9c1c3ceb70c9de0f4e390c3b68ced0c81b0b867dced7814d5d805cdfb6e0ccc9e62b82fac762f70c204f08feb3f3ee5647610d079cbdd7 languageName: node linkType: hard @@ -5107,7 +5107,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^3.0.1, @metamask/utils@npm:^3.0.3, @metamask/utils@npm:^3.4.1": +"@metamask/utils@npm:^3.0.3, @metamask/utils@npm:^3.4.1": version: 3.6.0 resolution: "@metamask/utils@npm:3.6.0" dependencies: @@ -5119,6 +5119,18 @@ __metadata: languageName: node linkType: hard +"@metamask/utils@npm:^4.0.0": + version: 4.0.0 + resolution: "@metamask/utils@npm:4.0.0" + dependencies: + "@types/debug": ^4.1.7 + debug: ^4.3.4 + semver: ^7.3.8 + superstruct: ^1.0.3 + checksum: 6d4edca78fe1f66504ed5e5ca021a67f4b4e0893e86484c746b87039c2161c39d3b8bd8e4b9235ddfd023b2d76dd54210af94ec5550e27bc4ad9c0d7d5f3f231 + languageName: node + linkType: hard + "@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.1, @metamask/utils@npm:^5.0.2": version: 5.0.2 resolution: "@metamask/utils@npm:5.0.2" @@ -16119,25 +16131,6 @@ __metadata: languageName: node linkType: hard -"eth-json-rpc-middleware@npm:^9.0.0": - version: 9.0.1 - resolution: "eth-json-rpc-middleware@npm:9.0.1" - dependencies: - "@metamask/eth-sig-util": ^5.0.0 - "@metamask/safe-event-emitter": ^2.0.0 - "@metamask/utils": ^3.0.3 - btoa: ^1.2.1 - clone: ^2.1.1 - eth-block-tracker: ^5.0.1 - eth-rpc-errors: ^4.0.3 - json-rpc-engine: ^6.1.0 - json-stable-stringify: ^1.0.1 - node-fetch: ^2.6.7 - pify: ^3.0.0 - checksum: 9512829a6958df6ef739b891a0c0804b51a140407fd2e3ddaaa6b18d975796646cfcf7f7305a18beb7903db09e0c7a91b06dc5434b6bd2d6cdb85d992d9fd3ab - languageName: node - linkType: hard - "eth-lattice-keyring@npm:^0.12.4": version: 0.12.4 resolution: "eth-lattice-keyring@npm:0.12.4" @@ -24659,7 +24652,7 @@ __metadata: "@metamask/base-controller": ^3.1.0 "@metamask/browser-passworder": ^4.1.0 "@metamask/contract-metadata": ^2.3.1 - "@metamask/controller-utils": ^4.1.0 + "@metamask/controller-utils": ^4.2.0 "@metamask/design-tokens": ^1.12.0 "@metamask/desktop": ^0.3.0 "@metamask/eslint-config": ^9.0.0 @@ -24681,7 +24674,7 @@ __metadata: "@metamask/logo": ^3.1.1 "@metamask/message-manager": ^7.0.2 "@metamask/metamask-eth-abis": ^3.0.0 - "@metamask/network-controller": ^10.3.0 + "@metamask/network-controller": ^10.3.1 "@metamask/notification-controller": ^3.0.0 "@metamask/obs-store": ^8.1.0 "@metamask/permission-controller": ^4.0.0