+
{headerText && (
{headerText}
diff --git a/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap b/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap
index 4f7cf9c922a1..e1566f6decb6 100644
--- a/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap
+++ b/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap
@@ -4,6 +4,7 @@ exports[`Confirm Delete Network should match snapshot 1`] = `
-
+ {!petnamesEnabled && (
+
+ )}
{petnamesEnabled ? (
diff --git a/ui/components/app/modals/contract-details-modal/index.scss b/ui/components/app/modals/contract-details-modal/index.scss
index 1d59615276cc..401a99518de8 100644
--- a/ui/components/app/modals/contract-details-modal/index.scss
+++ b/ui/components/app/modals/contract-details-modal/index.scss
@@ -11,6 +11,10 @@
box-shadow: none;
background: none;
}
+
+ .name {
+ margin: 5px;
+ }
}
}
}
diff --git a/ui/components/app/modals/fade-modal.js b/ui/components/app/modals/fade-modal.js
index e8c371f8db86..18ffe8d35007 100644
--- a/ui/components/app/modals/fade-modal.js
+++ b/ui/components/app/modals/fade-modal.js
@@ -129,9 +129,11 @@ class FadeModal extends Component {
onShow: PropTypes.func,
onHide: PropTypes.func,
children: PropTypes.node,
+ testId: PropTypes.string,
};
static defaultProps = {
+ testId: '',
onShow: () => undefined,
onHide: () => undefined,
keyboard: true,
@@ -177,7 +179,7 @@ class FadeModal extends Component {
}
const { willHide } = this.state;
- const { modalStyle } = this.props;
+ const { modalStyle, testId } = this.props;
const backdropStyle = {
animationName: willHide
? animation.hideBackdropAnimation
@@ -211,7 +213,7 @@ class FadeModal extends Component {
return (
-
+
(this.content = el)}
diff --git a/ui/components/app/modals/hide-token-confirmation-modal/__snapshots__/hide-token-confirmation-modal.test.js.snap b/ui/components/app/modals/hide-token-confirmation-modal/__snapshots__/hide-token-confirmation-modal.test.js.snap
index 16ef9005c5a5..83cfdf3723cc 100644
--- a/ui/components/app/modals/hide-token-confirmation-modal/__snapshots__/hide-token-confirmation-modal.test.js.snap
+++ b/ui/components/app/modals/hide-token-confirmation-modal/__snapshots__/hide-token-confirmation-modal.test.js.snap
@@ -3,86 +3,82 @@
exports[`Hide Token Confirmation Modal should match snapshot 1`] = `
+ Hide token?
+
+
- Hide token?
-
-
-
- TKN
-
-
+
+ TKN
+
+
+ You can add this token back in the future by going to “Import token” in your accounts options menu.
+
+
+
- You can add this token back in the future by going to “Import token” in your accounts options menu.
-
-
+
-
- Cancel
-
-
- Hide
-
-
+ Hide
+
diff --git a/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js b/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js
index ef1a962d09ca..ea10f513d846 100644
--- a/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js
+++ b/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js
@@ -51,42 +51,40 @@ class HideTokenConfirmationModal extends Component {
const { symbol, address, image } = token;
return (
-
-
-
- {this.context.t('hideTokenPrompt')}
-
-
-
{symbol}
-
- {this.context.t('readdToken')}
-
-
- hideModal()}
- >
- {this.context.t('cancel')}
-
- {
- hideToken(address);
- history.push(DEFAULT_ROUTE);
- }}
- >
- {this.context.t('hide')}
-
-
+
+
+ {this.context.t('hideTokenPrompt')}
+
+
+
{symbol}
+
+ {this.context.t('readdToken')}
+
+
+ hideModal()}
+ >
+ {this.context.t('cancel')}
+
+ {
+ hideToken(address);
+ history.push(DEFAULT_ROUTE);
+ }}
+ >
+ {this.context.t('hide')}
+
);
diff --git a/ui/components/app/modals/modal.js b/ui/components/app/modals/modal.js
index 88db123ca2dd..a461fd7bd70f 100644
--- a/ui/components/app/modals/modal.js
+++ b/ui/components/app/modals/modal.js
@@ -113,6 +113,7 @@ const custodyConfirmModalStyle = {
const MODALS = {
ONBOARDING_ADD_NETWORK: {
contents:
,
+ testId: 'add-network-modal',
...accountModalStyle,
},
NEW_ACCOUNT: {
@@ -144,6 +145,7 @@ const MODALS = {
HIDE_TOKEN_CONFIRMATION: {
contents:
,
+ testId: 'hide-token-confirmation-modal',
mobileModalStyle: {
width: '95%',
top: getEnvironmentType() === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
@@ -264,6 +266,7 @@ const MODALS = {
QR_SCANNER: {
contents:
,
+ testId: 'qr-scanner-modal',
mobileModalStyle: {
...modalContainerMobileStyle,
},
@@ -423,7 +426,7 @@ class Modal extends Component {
render() {
const modal = MODALS[this.props.modalState.name || 'DEFAULT'];
- const { contents: children, disableBackdropClick = false } = modal;
+ const { contents: children, disableBackdropClick = false, testId } = modal;
const modalStyle =
modal[isMobileView() ? 'mobileModalStyle' : 'laptopModalStyle'];
const contentStyle = modal.contentStyle || {};
@@ -451,6 +454,7 @@ class Modal extends Component {
contentStyle={contentStyle}
backdropStyle={BACKDROPSTYLE}
closeOnClick={!disableBackdropClick}
+ testId={testId}
>
{children}
diff --git a/ui/components/app/modals/qr-scanner/index.scss b/ui/components/app/modals/qr-scanner/index.scss
index 9c970397fa0e..98ca0f23ee50 100644
--- a/ui/components/app/modals/qr-scanner/index.scss
+++ b/ui/components/app/modals/qr-scanner/index.scss
@@ -34,6 +34,23 @@
}
}
+ &__progress {
+ width: 110px;
+ height: 4px;
+ border-radius: 2px;
+ overflow: hidden;
+ background-color: var(--color-border-muted);
+ margin: 6px auto 0;
+
+ &::before {
+ content: "";
+ display: block;
+ height: 100%;
+ width: var(--progress);
+ background-color: var(--color-primary-default);
+ }
+ }
+
&__status {
@include H6;
diff --git a/ui/components/app/name/__snapshots__/name.test.tsx.snap b/ui/components/app/name/__snapshots__/name.test.tsx.snap
index 95b059cbae01..8883e7dbe754 100644
--- a/ui/components/app/name/__snapshots__/name.test.tsx.snap
+++ b/ui/components/app/name/__snapshots__/name.test.tsx.snap
@@ -8,7 +8,7 @@ exports[`Name renders address with no saved name 1`] = `
>
-
+
diff --git a/ui/components/app/name/index.scss b/ui/components/app/name/index.scss
index e180c5a68168..91bcad6eebd6 100644
--- a/ui/components/app/name/index.scss
+++ b/ui/components/app/name/index.scss
@@ -8,7 +8,7 @@
max-width: 100%;
&__missing {
- background-color: var(--color-warning-muted);
+ background-color: var(--color-error-muted);
}
&__saved {
diff --git a/ui/components/app/name/name-details/__snapshots__/name-details.test.tsx.snap b/ui/components/app/name/name-details/__snapshots__/name-details.test.tsx.snap
index ee52667649b6..05b7d780e2dc 100644
--- a/ui/components/app/name/name-details/__snapshots__/name-details.test.tsx.snap
+++ b/ui/components/app/name/name-details/__snapshots__/name-details.test.tsx.snap
@@ -82,10 +82,50 @@ exports[`NameDetails renders proposed names 1`] = `
-
+
@@ -303,7 +343,7 @@ exports[`NameDetails renders with no saved name 1`] = `
>
-
+
diff --git a/ui/components/app/name/name.tsx b/ui/components/app/name/name.tsx
index 3f5b7f7b45ff..79dfe9614197 100644
--- a/ui/components/app/name/name.tsx
+++ b/ui/components/app/name/name.tsx
@@ -4,13 +4,14 @@ import classnames from 'classnames';
import { toChecksumAddress } from 'ethereumjs-util';
import { Icon, IconName, IconSize, Text } from '../../component-library';
import { shortenAddress } from '../../../helpers/utils/util';
-import { useName } from '../../../hooks/useName';
import { MetaMetricsContext } from '../../../contexts/metametrics';
import {
MetaMetricsEventCategory,
MetaMetricsEventName,
} from '../../../../shared/constants/metametrics';
import { TextVariant } from '../../../helpers/constants/design-system';
+import { useDisplayName } from '../../../hooks/useDisplayName';
+import Identicon from '../../ui/identicon';
import NameDetails from './name-details/name-details';
export interface NameProps {
@@ -46,7 +47,7 @@ export default function Name({
const [modalOpen, setModalOpen] = useState(false);
const trackEvent = useContext(MetaMetricsContext);
- const { name } = useName(value, type);
+ const name = useDisplayName(value, type);
useEffect(() => {
if (internal) {
@@ -73,7 +74,6 @@ export default function Name({
const formattedValue = formatValue(value, type);
const hasName = Boolean(name);
- const iconName = hasName ? IconName.Save : IconName.Warning;
return (
@@ -88,7 +88,15 @@ export default function Name({
})}
onClick={handleClick}
>
-
+ {hasName ? (
+
+ ) : (
+
+ )}
{hasName ? (
{name}
diff --git a/ui/components/app/nfts-items/nfts-items.js b/ui/components/app/nfts-items/nfts-items.js
index c17eb0d0a3ba..22a298bf5b66 100644
--- a/ui/components/app/nfts-items/nfts-items.js
+++ b/ui/components/app/nfts-items/nfts-items.js
@@ -20,7 +20,7 @@ import { getEnvironmentType } from '../../../../app/scripts/lib/util';
import {
getCurrentChainId,
getIpfsGateway,
- getSelectedAddress,
+ getSelectedInternalAccount,
getCurrentNetwork,
getOpenSeaEnabled,
} from '../../../selectors';
@@ -62,7 +62,7 @@ export default function NftsItems({
const collectionsKeys = Object.keys(collections);
const nftsDropdownState = useSelector(getNftsDropdownState);
const previousCollectionKeys = usePrevious(collectionsKeys);
- const selectedAddress = useSelector(getSelectedAddress);
+ const { address: selectedAddress } = useSelector(getSelectedInternalAccount);
const chainId = useSelector(getCurrentChainId);
const currentChain = useSelector(getCurrentNetwork);
const t = useI18nContext();
diff --git a/ui/components/app/nfts-tab/nfts-tab.test.js b/ui/components/app/nfts-tab/nfts-tab.test.js
index c4f3d6c73de0..47cde9b8f44a 100644
--- a/ui/components/app/nfts-tab/nfts-tab.test.js
+++ b/ui/components/app/nfts-tab/nfts-tab.test.js
@@ -1,6 +1,7 @@
import React from 'react';
import { fireEvent, screen } from '@testing-library/react';
import reactRouterDom from 'react-router-dom';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import configureStore from '../../../store/store';
import { renderWithProvider } from '../../../../test/jest';
import { SECURITY_ROUTE } from '../../../helpers/constants/routes';
@@ -165,6 +166,24 @@ const render = ({
},
providerConfig: { chainId },
selectedAddress,
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: selectedAddress,
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
useNftDetection,
nftsDropdownState,
},
diff --git a/ui/components/app/qr-hardware-popover/base-reader.js b/ui/components/app/qr-hardware-popover/base-reader.js
index 2d84c24a0b89..7aca256db53d 100644
--- a/ui/components/app/qr-hardware-popover/base-reader.js
+++ b/ui/components/app/qr-hardware-popover/base-reader.js
@@ -26,6 +26,7 @@ const BaseReader = ({
const [ready, setReady] = useState(READY_STATE.ACCESSING_CAMERA);
const [error, setError] = useState(null);
const [urDecoder, setURDecoder] = useState(new URDecoder());
+ const [progress, setProgress] = useState(0);
let permissionChecker = null;
const mounted = useRef(false);
@@ -34,6 +35,7 @@ const BaseReader = ({
setReady(READY_STATE.ACCESSING_CAMERA);
setError(null);
setURDecoder(new URDecoder());
+ setProgress(0);
};
const checkEnvironment = async () => {
@@ -86,6 +88,7 @@ const BaseReader = ({
return;
}
urDecoder.receivePart(data);
+ setProgress(urDecoder.estimatedPercentComplete());
if (urDecoder.isComplete()) {
const result = urDecoder.resultUR();
handleSuccess(result).catch(setError);
@@ -165,7 +168,9 @@ const BaseReader = ({
{title ?
{title}
: null}
-
{msg}
+
+ {msg}
+
{
setErrorTitle('');
@@ -197,6 +202,13 @@ const BaseReader = ({
+ {progress > 0 && (
+
+ )}
{message && {message}
}
>
);
diff --git a/ui/components/app/qr-hardware-popover/base-reader.test.js b/ui/components/app/qr-hardware-popover/base-reader.test.js
new file mode 100644
index 000000000000..747f90bdbd3f
--- /dev/null
+++ b/ui/components/app/qr-hardware-popover/base-reader.test.js
@@ -0,0 +1,58 @@
+import React from 'react';
+import { screen } from '@testing-library/react';
+import { renderWithProvider } from '../../../../test/jest';
+import WebcamUtils from '../../../helpers/utils/webcam-utils';
+import BaseReader from './base-reader';
+import EnhancedReader from './enhanced-reader';
+
+jest.mock('./enhanced-reader');
+jest.mock('../../../helpers/utils/webcam-utils');
+
+describe('Base Reader', () => {
+ const mockBaseReaderData = {
+ isReadingWallet: true,
+ handleCancel: jest.fn(),
+ handleSuccess: jest.fn(),
+ setErrorTitle: jest.fn(),
+ };
+
+ it('renders progress bar', () => {
+ EnhancedReader.mockImplementation(({ handleScan }) => {
+ handleScan(
+ 'UR:CRYPTO-HDKEY/24-2/LPCSCSAOCSNYCYNLAMSKJPHDGTEHOEADCSFNAOAEAMTAADDYOTADLNCSDWYKCSFNYKAEYKAOCYJKSKTNBKAXAXATTAADDYOEADLRAEWKLAWKAXAEAYCYTEDMFEAYASISGRIHKKJKJYJLJTIHBKJOHSIAIAJLKPJTJYDMJKJYHSJTIEHSJPIEHTSTGSAO',
+ );
+ return null;
+ });
+ WebcamUtils.checkStatus.mockImplementation(() =>
+ Promise.resolve({ permissions: true, environmentReady: true }),
+ );
+ renderWithProvider( );
+ expect(screen.getByTestId('qr-reader-progress-bar')).toBeInTheDocument();
+ });
+
+ it('not renders progress bar when error', async () => {
+ EnhancedReader.mockImplementation(() => null);
+ WebcamUtils.checkStatus.mockImplementation(() =>
+ Promise.resolve({ permissions: false, environmentReady: false }),
+ );
+ renderWithProvider( );
+ await screen.findByTestId('qr-scanner__error');
+ expect(screen.queryByTestId('qr-reader-progress-bar')).toBeNull();
+ });
+
+ it('not renders progress bar when ready', async () => {
+ EnhancedReader.mockImplementation(() => null);
+ WebcamUtils.checkStatus.mockImplementation(() =>
+ Promise.resolve({ permissions: true, environmentReady: true }),
+ );
+ renderWithProvider( );
+ await screen.findByText(
+ 'Place the QR code in front of your camera. The screen is blurred, but it will not affect the reading.',
+ undefined,
+ {
+ timeout: 5000,
+ },
+ );
+ expect(screen.queryByTestId('qr-reader-progress-bar')).toBeNull();
+ });
+});
diff --git a/ui/components/app/reveal-SRP-modal/reveal-SRP-modal.js b/ui/components/app/reveal-SRP-modal/reveal-SRP-modal.js
index dabdf2e062d4..eeac838563c3 100644
--- a/ui/components/app/reveal-SRP-modal/reveal-SRP-modal.js
+++ b/ui/components/app/reveal-SRP-modal/reveal-SRP-modal.js
@@ -36,7 +36,7 @@ export default function RevealSRPModal({
);
return (
-
+
{t('revealSeedWords')}
diff --git a/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js b/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js
index f1d713482c6a..05cfafab7c3a 100644
--- a/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js
+++ b/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js
@@ -9,6 +9,7 @@ import {
Severity,
} from '../../../../helpers/constants/design-system';
import { I18nContext } from '../../../../contexts/i18n';
+import { useTransactionEventFragment } from '../../../../hooks/useTransactionEventFragment';
import {
BlockaidReason,
BlockaidResultType,
@@ -56,6 +57,7 @@ function BlockaidBannerAlert({ txData, ...props }) {
txData;
const t = useContext(I18nContext);
+ const { updateTransactionEventFragment } = useTransactionEventFragment();
if (!securityAlertResponse) {
return null;
@@ -115,6 +117,17 @@ function BlockaidBannerAlert({ txData, ...props }) {
const reportUrl = getReportUrl(encodedData);
+ const onClickSupportLink = () => {
+ updateTransactionEventFragment(
+ {
+ properties: {
+ external_link_clicked: 'security_alert_support_link',
+ },
+ },
+ txData.id,
+ );
+ };
+
return (
);
diff --git a/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.test.js b/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.test.js
index d60ba37f0da9..5ed7d0c43b63 100644
--- a/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.test.js
+++ b/ui/components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.test.js
@@ -1,7 +1,9 @@
import React from 'react';
import * as Sentry from '@sentry/browser';
-import { renderWithLocalization } from '../../../../../test/lib/render-helpers';
+import { fireEvent, screen } from '@testing-library/react';
+import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import { Severity } from '../../../../helpers/constants/design-system';
+import configureStore from '../../../../store/store';
import {
BlockaidReason,
BlockaidResultType,
@@ -13,6 +15,18 @@ jest.mock('zlib', () => ({
gzipSync: (val) => val,
}));
+const mockUpdateTransactionEventFragment = jest.fn();
+
+jest.mock('../../../../hooks/useTransactionEventFragment', () => {
+ return {
+ useTransactionEventFragment: () => {
+ return {
+ updateTransactionEventFragment: mockUpdateTransactionEventFragment,
+ };
+ },
+ };
+});
+
const mockSecurityAlertResponse = {
result_type: BlockaidResultType.Warning,
reason: BlockaidReason.setApprovalForAll,
@@ -26,19 +40,20 @@ const mockSecurityAlertResponse = {
describe('Blockaid Banner Alert', () => {
it('should not render when securityAlertResponse is not present', () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
,
+ configureStore(),
);
expect(container.querySelector('.mm-banner-alert')).toBeNull();
});
it(`should not render when securityAlertResponse.result_type is '${BlockaidResultType.Benign}'`, () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(container.querySelector('.mm-banner-alert')).toBeNull();
});
it(`should render '${Severity.Warning}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Failed}`, () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
const warningBannerAlert = container.querySelector(
'.mm-banner-alert--severity-warning',
@@ -72,12 +89,13 @@ describe('Blockaid Banner Alert', () => {
});
it(`should render '${Severity.Warning}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Warning}`, () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
,
+ configureStore(),
);
const warningBannerAlert = container.querySelector(
'.mm-banner-alert--severity-warning',
@@ -88,7 +106,7 @@ describe('Blockaid Banner Alert', () => {
});
it(`should render '${Severity.Danger}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Malicious}`, () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
const dangerBannerAlert = container.querySelector(
'.mm-banner-alert--severity-danger',
@@ -107,19 +126,20 @@ describe('Blockaid Banner Alert', () => {
});
it('should render title, "This is a deceptive request"', () => {
- const { getByText } = renderWithLocalization(
+ const { getByText } = renderWithProvider(
,
+ configureStore(),
);
expect(getByText('This is a deceptive request')).toBeInTheDocument();
});
it(`should render title, "This is a suspicious request", when the reason is "${BlockaidReason.failed}"`, () => {
- const { getByText } = renderWithLocalization(
+ const { getByText } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(getByText('Request may not be safe')).toBeInTheDocument();
});
it(`should render title, "This is a suspicious request", when the reason is "${BlockaidReason.rawSignatureFarming}"`, () => {
- const { getByText } = renderWithLocalization(
+ const { getByText } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(getByText('This is a suspicious request')).toBeInTheDocument();
@@ -154,7 +176,7 @@ describe('Blockaid Banner Alert', () => {
'Operator is untrusted according to previous activity',
];
- const { container, getByText } = renderWithLocalization(
+ const { container, getByText } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(container).toMatchSnapshot();
@@ -173,13 +196,14 @@ describe('Blockaid Banner Alert', () => {
});
it('should render details section even when features is not provided', () => {
- const { container } = renderWithLocalization(
+ const { container } = renderWithProvider(
,
+ configureStore(),
);
expect(container).toMatchSnapshot();
@@ -187,13 +211,14 @@ describe('Blockaid Banner Alert', () => {
});
it('should render link to report url', () => {
- const { container, getByText, getByRole } = renderWithLocalization(
+ const { container, getByText, getByRole } = renderWithProvider(
,
+ configureStore(),
);
expect(container).toMatchSnapshot();
@@ -204,13 +229,14 @@ describe('Blockaid Banner Alert', () => {
});
it('should pass required data in Report an issue URL', () => {
- const { getByRole } = renderWithLocalization(
+ const { getByRole } = renderWithProvider(
,
+ configureStore(),
);
const elm = getByRole('link', { name: 'Report an issue' });
@@ -249,7 +275,7 @@ describe('Blockaid Banner Alert', () => {
'If you approve this request, a third party known for scams will take all your assets.',
}).forEach(([reason, expectedDescription]) => {
it(`should render for '${reason}' correctly`, () => {
- const { getByText } = renderWithLocalization(
+ const { getByText } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(getByText(expectedDescription)).toBeInTheDocument();
@@ -269,7 +296,7 @@ describe('Blockaid Banner Alert', () => {
it('renders the "other" description translation and logs a Sentry exception', () => {
const stubOtherDescription =
'If you approve this request, you might lose your assets.';
- const { getByText } = renderWithLocalization(
+ const { getByText } = renderWithProvider(
{
},
}}
/>,
+ configureStore(),
);
expect(getByText(stubOtherDescription)).toBeInTheDocument();
expect(Sentry.captureException).toHaveBeenCalledTimes(1);
});
});
+
+ describe('when clicking "See details" > "Report an issue"', () => {
+ it('calls updateTransactionEventFragment to add "external_link_clicked" prop to metric', () => {
+ const stubScrollIntoView = jest.fn();
+ const originalScrollIntoView =
+ window.HTMLElement.prototype.scrollIntoView;
+ window.HTMLElement.prototype.scrollIntoView = stubScrollIntoView;
+
+ renderWithProvider(
+ ,
+ configureStore(),
+ );
+
+ fireEvent.click(screen.queryByText('See details'));
+ fireEvent.click(screen.queryByText('Report an issue'));
+
+ expect(mockUpdateTransactionEventFragment).toHaveBeenCalledTimes(1);
+ expect(mockUpdateTransactionEventFragment).toHaveBeenCalledWith(
+ {
+ properties: {
+ external_link_clicked: 'security_alert_support_link',
+ },
+ },
+ '1',
+ );
+ window.HTMLElement.prototype.scrollIntoView = originalScrollIntoView;
+ });
+ });
});
diff --git a/ui/components/app/signature-request-original/signature-request-original-warning/index.scss b/ui/components/app/signature-request-original/signature-request-original-warning/index.scss
deleted file mode 100644
index 71531ee535cb..000000000000
--- a/ui/components/app/signature-request-original/signature-request-original-warning/index.scss
+++ /dev/null
@@ -1,27 +0,0 @@
-.signature-request-warning {
- &__content {
- &__header {
- border-bottom: 1px solid var(--color-border-muted);
- align-items: center;
-
- &__warning-icon {
- padding-top: 7px;
- margin-right: 10px;
- }
- }
-
- &__account {
- border-bottom: 1px solid var(--color-border-muted);
- }
-
- &__bold {
- color: var(--color-text-default);
- }
- }
-
- &__footer {
- border-top: 1px solid var(--color-border-muted);
- width: 100%;
- height: 132px;
- }
-}
diff --git a/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js b/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js
index d62604b93d12..e4cc7c18be10 100644
--- a/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js
+++ b/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js
@@ -2,19 +2,34 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useI18nContext } from '../../../../hooks/useI18nContext';
-import Popover from '../../../ui/popover';
import {
IconColor,
Display,
FlexDirection,
- FontWeight,
JustifyContent,
TextColor,
TextVariant,
+ AlignItems,
+ TextAlign,
+ BlockSize,
} from '../../../../helpers/constants/design-system';
-import Identicon from '../../../ui/identicon';
import { shortenAddress } from '../../../../helpers/utils/util';
-import { Icon, IconName, Box, Text, Button } from '../../../component-library';
+import {
+ Icon,
+ IconName,
+ Box,
+ Text,
+ ButtonVariant,
+ Modal,
+ ModalContent,
+ ModalFooter,
+ ModalBody,
+ ModalHeader,
+ AvatarAccount,
+ AvatarAccountSize,
+ IconSize,
+ ModalOverlay,
+} from '../../../component-library';
const SignatureRequestOriginalWarning = ({
senderAddress,
@@ -25,87 +40,81 @@ const SignatureRequestOriginalWarning = ({
const t = useI18nContext();
return (
-
-
-
-
- {t('yourFundsMayBeAtRisk')}
-
-
-
-
-
-
- {name} {` (${shortenAddress(senderAddress)})`}
-
-
-
-
-
- {t('signatureRequestWarning', [
-
- {t('learnMoreUpperCase')}
- ,
- ])}
-
-
-
-
+
+
+
- {t('sign')}
-
-
+
+ {t('yourFundsMayBeAtRisk')}
+
+
+
- {t('reject')}
-
-
-
+
+
+
+ {name} {` (${shortenAddress(senderAddress)})`}
+
+
+
+ {t('signatureRequestWarning', [
+
+ {t('learnMoreUpperCase')}
+ ,
+ ])}
+
+
+
+
+
);
};
diff --git a/ui/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js
index 8a03537c7ba3..6c95907dad53 100644
--- a/ui/components/app/signature-request-original/signature-request-original.component.js
+++ b/ui/components/app/signature-request-original/signature-request-original.component.js
@@ -45,10 +45,6 @@ import {
} from '../../component-library';
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
-} from '../../../../shared/constants/metametrics';
import BlockaidBannerAlert from '../security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert';
///: END:ONLY_INCLUDE_IF
@@ -152,20 +148,6 @@ export default class SignatureRequestOriginal extends Component {
rows = [{ name: this.context.t('message'), value: data }];
}
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- const onClickSupportLink = () => {
- this.context.trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Sign Request',
- origin: txData?.origin,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- };
- ///: END:ONLY_INCLUDE_IF
-
const targetSubjectMetadata = txData.msgParams.origin
? subjectMetadata?.[txData.msgParams.origin]
: null;
@@ -174,11 +156,7 @@ export default class SignatureRequestOriginal extends Component {
{
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-
+
///: END:ONLY_INCLUDE_IF
}
{isSuspiciousResponse(txData?.securityProviderResponse) && (
diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe.js b/ui/components/app/signature-request-siwe/signature-request-siwe.js
index 9d97dcf2df51..cca280868ad3 100644
--- a/ui/components/app/signature-request-siwe/signature-request-siwe.js
+++ b/ui/components/app/signature-request-siwe/signature-request-siwe.js
@@ -1,11 +1,4 @@
-import React, {
- useCallback,
- useContext,
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- useEffect,
- ///: END:ONLY_INCLUDE_IF
- useState,
-} from 'react';
+import React, { useCallback, useContext, useState } from 'react';
import PropTypes from 'prop-types';
import { useSelector, useDispatch } from 'react-redux';
import { useHistory } from 'react-router-dom';
@@ -47,12 +40,6 @@ import ConfirmPageContainerNavigation from '../confirm-page-container/confirm-pa
import { getMostRecentOverviewPage } from '../../../ducks/history/history';
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
import BlockaidBannerAlert from '../security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert';
-import { getBlockaidMetricsParams } from '../../../helpers/utils/metrics';
-import { MetaMetricsContext } from '../../../contexts/metametrics';
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
-} from '../../../../shared/constants/metametrics';
///: END:ONLY_INCLUDE_IF
import LedgerInstructionField from '../ledger-instruction-field';
@@ -70,40 +57,6 @@ export default function SignatureRequestSIWE({ txData }) {
const messagesList = useSelector(unconfirmedMessagesHashSelector);
const mostRecentOverviewPage = useSelector(getMostRecentOverviewPage);
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- const trackEvent = useContext(MetaMetricsContext);
-
- useEffect(() => {
- if (txData.securityAlertResponse) {
- const blockaidMetricsParams = getBlockaidMetricsParams(
- txData.securityAlertResponse,
- );
-
- trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.SignatureRequested,
- properties: {
- action: 'Sign Request',
- ...blockaidMetricsParams,
- },
- });
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- const onClickSupportLink = useCallback(() => {
- trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Sign Request SIWE',
- origin: txData?.origin,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- }, [trackEvent, txData?.origin]);
- ///: END:ONLY_INCLUDE_IF
-
const {
msgParams: {
from,
@@ -180,11 +133,7 @@ export default function SignatureRequestSIWE({ txData }) {
{
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-
+
///: END:ONLY_INCLUDE_IF
}
{showSecurityProviderBanner && (
diff --git a/ui/components/app/signature-request/signature-request-data/signature-request-data.js b/ui/components/app/signature-request/signature-request-data/signature-request-data.js
index e6a4a97d12e6..2e2f058f188b 100644
--- a/ui/components/app/signature-request/signature-request-data/signature-request-data.js
+++ b/ui/components/app/signature-request/signature-request-data/signature-request-data.js
@@ -4,7 +4,7 @@ import { isEqual } from 'lodash';
import PropTypes from 'prop-types';
import { NameType } from '@metamask/name-controller';
import {
- getMemoizedMetaMaskIdentities,
+ getMemoizedMetaMaskInternalAccounts,
getAccountName,
} from '../../../../selectors';
import Address from '../../transaction-decoding/components/decoding/address';
@@ -24,7 +24,7 @@ import { usePetnamesEnabled } from '../../../../hooks/usePetnamesEnabled';
import Name from '../../name/name';
function SignatureRequestData({ data }) {
- const identities = useSelector(getMemoizedMetaMaskIdentities);
+ const internalAccounts = useSelector(getMemoizedMetaMaskInternalAccounts);
const petnamesEnabled = usePetnamesEnabled();
return (
@@ -75,7 +75,7 @@ function SignatureRequestData({ data }) {
)}
diff --git a/ui/components/app/signature-request/signature-request-data/signature-request-data.test.js b/ui/components/app/signature-request/signature-request-data/signature-request-data.test.js
index ec59fad31b15..f42c24cd43c4 100644
--- a/ui/components/app/signature-request/signature-request-data/signature-request-data.test.js
+++ b/ui/components/app/signature-request/signature-request-data/signature-request-data.test.js
@@ -1,5 +1,6 @@
import React from 'react';
import configureMockStore from 'redux-mock-store';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import { sanitizeMessage } from '../../../../helpers/utils/util';
import Identicon from '../../../ui/identicon';
@@ -48,6 +49,37 @@ describe('Signature Request Data', () => {
address: '0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF',
},
},
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ '07c2cfec-36c9-46c4-8115-3836d3ac9047': {
+ address: '0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF',
+ id: '07c2cfec-36c9-46c4-8115-3836d3ac9047',
+ metadata: {
+ name: 'Account 2',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
addressBook: {
'0x5': {
'0x06195827297c7A80a443b6894d3BDB8824b43896': {
@@ -180,7 +212,7 @@ describe('Signature Request Data', () => {
expect(iconImage).toBeDefined();
});
- it('should render first account name from wallets array if address exists in identities object', () => {
+ it('should render first account name from wallets array if address exists in internal account object', () => {
const { getByText } = renderWithProvider(
,
store,
@@ -199,7 +231,7 @@ describe('Signature Request Data', () => {
expect(iconImage).toBeDefined();
});
- it('should render second account name from wallets array if address exists in identities object', () => {
+ it('should render second account name from wallets array if address exists in internal account object', () => {
const { getByText } = renderWithProvider(
,
store,
@@ -264,7 +296,7 @@ describe('Signature Request Data', () => {
expect(iconImage).toBeDefined();
});
- it('should render first shorten address from wallets array if address does not exists in identities and address book objects', () => {
+ it('should render first shorten address from wallets array if address does not exists in internal account and address book objects', () => {
const { getByText } = renderWithProvider(
,
store,
@@ -283,7 +315,7 @@ describe('Signature Request Data', () => {
expect(iconImage).toBeDefined();
});
- it('should render second shorten address from wallets array if address does not exists in identities and address book objects', () => {
+ it('should render second shorten address from wallets array if address does not exists in internal account and address book objects', () => {
const { getByText } = renderWithProvider(
,
store,
@@ -302,7 +334,7 @@ describe('Signature Request Data', () => {
expect(iconImage).toBeDefined();
});
- it('should render third shorten address from wallets array if address does not exists in identities and address book objects', () => {
+ it('should render third shorten address from wallets array if address does not exists in internal account and address book objects', () => {
const { getByText } = renderWithProvider(
,
store,
diff --git a/ui/components/app/signature-request/signature-request.js b/ui/components/app/signature-request/signature-request.js
index 5a666166058a..874f89485f2b 100644
--- a/ui/components/app/signature-request/signature-request.js
+++ b/ui/components/app/signature-request/signature-request.js
@@ -1,11 +1,4 @@
-import React, {
- useContext,
- useState,
- useEffect,
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- useCallback,
- ///: END:ONLY_INCLUDE_IF
-} from 'react';
+import React, { useContext, useState, useEffect } from 'react';
import {
useDispatch,
useSelector,
@@ -56,7 +49,7 @@ import ContractDetailsModal from '../modals/contract-details-modal';
import { MetaMetricsContext } from '../../../contexts/metametrics';
import {
MetaMetricsEventCategory,
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi,blockaid)
+ ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
MetaMetricsEventName,
///: END:ONLY_INCLUDE_IF
} from '../../../../shared/constants/metametrics';
@@ -162,21 +155,6 @@ const SignatureRequest = ({ txData }) => {
return { sanitizedMessage, domain, primaryType };
});
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- const onClickSupportLink = useCallback(() => {
- trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Sign Request',
- type,
- version,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- }, [trackEvent, type, version]);
- ///: END:ONLY_INCLUDE_IF
-
const onSign = async () => {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
if (accountType === 'custody') {
@@ -272,7 +250,6 @@ const SignatureRequest = ({ txData }) => {
marginLeft={4}
marginRight={4}
marginBottom={4}
- onClickSupportLink={onClickSupportLink}
/>
///: END:ONLY_INCLUDE_IF
}
diff --git a/ui/components/app/signature-request/signature-request.test.js b/ui/components/app/signature-request/signature-request.test.js
index c7ddf4ad32cd..2a60a410b215 100644
--- a/ui/components/app/signature-request/signature-request.test.js
+++ b/ui/components/app/signature-request/signature-request.test.js
@@ -2,6 +2,7 @@ import React from 'react';
import { useSelector } from 'react-redux';
import { fireEvent } from '@testing-library/react';
import configureMockStore from 'redux-mock-store';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import { showCustodianDeepLink } from '@metamask-institutional/extension';
import mockState from '../../../../test/data/mock-state.json';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
@@ -15,12 +16,13 @@ import {
conversionRateSelector,
getCurrentCurrency,
getMemoizedAddressBook,
- getMemoizedMetaMaskIdentities,
getPreferences,
getSelectedAccount,
getTotalUnapprovedMessagesCount,
+ getInternalAccounts,
unconfirmedTransactionsHashSelector,
getAccountType,
+ getMemoizedMetaMaskInternalAccounts,
} from '../../../selectors';
import SignatureRequest from './signature-request';
@@ -52,6 +54,25 @@ const mockStore = {
},
},
selectedAddress: '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'John Doe',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
+ nativeCurrency: 'ETH',
currentCurrency: 'usd',
currencyRates: {
ETH: {
@@ -98,6 +119,10 @@ const generateUseSelectorRouter = (opts) => (selector) => {
?.conversionRate;
case getSelectedAccount:
return opts.metamask.accounts[opts.metamask.selectedAddress];
+ case getInternalAccounts:
+ return Object.values(opts.metamask.internalAccounts.accounts);
+ case getMemoizedMetaMaskInternalAccounts:
+ return Object.values(opts.metamask.internalAccounts.accounts);
case getMemoizedAddressBook:
return [];
case accountsWithSendEtherInfoSelector:
@@ -105,7 +130,6 @@ const generateUseSelectorRouter = (opts) => (selector) => {
case getAccountType:
return 'custody';
case unconfirmedTransactionsHashSelector:
- case getMemoizedMetaMaskIdentities:
return {};
default:
return undefined;
@@ -449,6 +473,42 @@ describe('Signature Request Component', () => {
balance: '0x0',
name: 'Account 1',
},
+ '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5': {
+ address: '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5',
+ balance: '0x0',
+ name: 'Account 2',
+ },
+ },
+ internalAccounts: {
+ accounts: {
+ 'b7e813d6-e31c-4bad-8615-8d4eff9f44f1': {
+ address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
+ id: 'b7e813d6-e31c-4bad-8615-8d4eff9f44f1',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Account 2',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'b7e813d6-e31c-4bad-8615-8d4eff9f44f1',
},
},
}),
diff --git a/ui/components/app/terms-of-use-popup/terms-of-use-popup.test.js b/ui/components/app/terms-of-use-popup/terms-of-use-popup.test.js
index 02125e981ccd..5373308337d1 100644
--- a/ui/components/app/terms-of-use-popup/terms-of-use-popup.test.js
+++ b/ui/components/app/terms-of-use-popup/terms-of-use-popup.test.js
@@ -34,15 +34,20 @@ describe('TermsOfUsePopup', () => {
});
it('scrolls down when handleScrollDownClick is called', () => {
- render();
const mockScrollIntoView = jest.fn();
+ const originalScrollIntoView = window.HTMLElement.prototype.scrollIntoView;
window.HTMLElement.prototype.scrollIntoView = mockScrollIntoView;
+
+ render();
const button = document.querySelector(
"[data-testid='popover-scroll-button']",
);
+
fireEvent.click(button);
expect(mockScrollIntoView).toHaveBeenCalledWith({
behavior: 'smooth',
});
+
+ window.HTMLElement.prototype.scrollIntoView = originalScrollIntoView;
});
});
diff --git a/ui/components/app/token-cell/__snapshots__/token-cell.test.js.snap b/ui/components/app/token-cell/__snapshots__/token-cell.test.js.snap
index ebf7e4a58ccf..7466e3797884 100644
--- a/ui/components/app/token-cell/__snapshots__/token-cell.test.js.snap
+++ b/ui/components/app/token-cell/__snapshots__/token-cell.test.js.snap
@@ -46,7 +46,7 @@ exports[`Token Cell should match snapshot 1`] = `
class="mm-box mm-box--display-flex mm-box--gap-1 mm-box--flex-direction-row mm-box--justify-content-space-between"
>
{
- trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Confirm Screen',
- origin: txData?.origin,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- }, [trackEvent, txData?.origin]);
- ///: END:ONLY_INCLUDE_IF
-
return (
{
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-
+
///: END:ONLY_INCLUDE_IF
}
{isSuspiciousResponse(txData?.securityProviderResponse) && (
diff --git a/ui/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js
index e48d5d7682c3..76688f59b0cb 100644
--- a/ui/components/app/transaction-list-item/transaction-list-item.component.js
+++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js
@@ -3,7 +3,7 @@ import React, { useMemo, useState, useCallback, useContext } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { useHistory } from 'react-router-dom';
-import { useSelector } from 'react-redux';
+import { useDispatch, useSelector } from 'react-redux';
import { TransactionStatus } from '@metamask/transaction-controller';
import { useTransactionDisplayData } from '../../../hooks/useTransactionDisplayData';
@@ -64,6 +64,7 @@ import EditGasFeePopover from '../edit-gas-fee-popover';
import EditGasPopover from '../edit-gas-popover';
import { MetaMetricsContext } from '../../../contexts/metametrics';
import { ActivityListItem } from '../../multichain';
+import { abortTransactionSigning } from '../../../store/actions';
function TransactionListItemInner({
transactionGroup,
@@ -80,6 +81,7 @@ function TransactionListItemInner({
const { supportsEIP1559 } = useGasFeeContext();
const { openModal } = useTransactionModalContext();
const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
+ const dispatch = useDispatch();
const {
initialTransaction: { id },
@@ -120,14 +122,24 @@ function TransactionListItemInner({
legacy_event: true,
},
});
- if (supportsEIP1559) {
+ if (status === TransactionStatus.approved) {
+ dispatch(abortTransactionSigning(id));
+ } else if (supportsEIP1559) {
setEditGasMode(EditGasModes.cancel);
openModal('cancelSpeedUpTransaction');
} else {
setShowCancelEditGasPopover(true);
}
},
- [trackEvent, openModal, setEditGasMode, supportsEIP1559],
+ [
+ trackEvent,
+ openModal,
+ setEditGasMode,
+ supportsEIP1559,
+ status,
+ dispatch,
+ id,
+ ],
);
const shouldShowSpeedUp = useShouldShowSpeedUp(
@@ -154,6 +166,8 @@ function TransactionListItemInner({
const isApproval = category === TransactionGroupCategory.approval;
const isUnapproved = status === TransactionStatus.unapproved;
const isSwap = category === TransactionGroupCategory.swap;
+ const isSigning = status === TransactionStatus.approved;
+ const isSubmitting = status === TransactionStatus.signed;
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
const isCustodian = Boolean(transactionGroup.primaryTransaction.custodyId);
///: END:ONLY_INCLUDE_IF
@@ -206,12 +220,19 @@ function TransactionListItemInner({
}
///: END:ONLY_INCLUDE_IF
- if (!shouldShowSpeedUp || !isPending || isUnapproved) {
+ if (
+ !shouldShowSpeedUp ||
+ !isPending ||
+ isUnapproved ||
+ isSigning ||
+ isSubmitting
+ ) {
return null;
}
return (
{
jest.mock('../../../store/actions.ts', () => ({
tryReverseResolveAddress: jest.fn().mockReturnValue({ type: 'TYPE' }),
+ abortTransactionSigning: jest.fn(),
}));
jest.mock('../../../store/institutional/institution-background', () => ({
@@ -118,17 +120,17 @@ const generateUseSelectorRouter = (opts) => (selector) => {
};
describe('TransactionListItem', () => {
- describe('ActivityListItem interactions', () => {
- beforeAll(() => {
- useGasFeeEstimates.mockImplementation(
- () => FEE_MARKET_ESTIMATE_RETURN_VALUE,
- );
- });
+ beforeAll(() => {
+ useGasFeeEstimates.mockImplementation(
+ () => FEE_MARKET_ESTIMATE_RETURN_VALUE,
+ );
+ });
- afterAll(() => {
- useGasFeeEstimates.mockRestore();
- });
+ afterAll(() => {
+ useGasFeeEstimates.mockRestore();
+ });
+ describe('ActivityListItem interactions', () => {
it('should show the activity details popover and log metrics when the activity list item is clicked', () => {
useSelector.mockImplementation(
generateUseSelectorRouter({
@@ -166,16 +168,6 @@ describe('TransactionListItem', () => {
});
describe('when account has insufficient balance to cover gas', () => {
- beforeAll(() => {
- useGasFeeEstimates.mockImplementation(
- () => FEE_MARKET_ESTIMATE_RETURN_VALUE,
- );
- });
-
- afterAll(() => {
- useGasFeeEstimates.mockRestore();
- });
-
it(`should indicate account has insufficient funds to cover gas price for cancellation of pending transaction`, () => {
useSelector.mockImplementation(
generateUseSelectorRouter({
@@ -225,7 +217,10 @@ describe('TransactionListItem', () => {
const newTransactionGroup = {
...transactionGroup,
- ...(transactionGroup.primaryTransaction.custodyId = '1'),
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ custodyId: '1',
+ },
};
const { getByTestId } = renderWithProvider(
@@ -247,9 +242,11 @@ describe('TransactionListItem', () => {
const newTransactionGroup = {
...transactionGroup,
- ...(transactionGroup.primaryTransaction.custodyId = '1'),
- ...(transactionGroup.primaryTransaction.status =
- TransactionStatus.signed),
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ custodyId: '1',
+ status: TransactionStatus.signed,
+ },
};
const { getByTestId } = renderWithProvider(
@@ -270,9 +267,11 @@ describe('TransactionListItem', () => {
const newTransactionGroup = {
...transactionGroup,
- ...(transactionGroup.primaryTransaction.custodyId = '1'),
- ...(transactionGroup.primaryTransaction.status =
- TransactionStatus.rejected),
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ custodyId: '1',
+ status: TransactionStatus.rejected,
+ },
};
const { getByTestId } = renderWithProvider(
@@ -295,7 +294,10 @@ describe('TransactionListItem', () => {
const newTransactionGroup = {
...transactionGroup,
- ...(transactionGroup.primaryTransaction.custodyId = '1'),
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ custodyId: '1',
+ },
};
const { queryByTestId } = renderWithProvider(
@@ -321,7 +323,10 @@ describe('TransactionListItem', () => {
const newTransactionGroup = {
...transactionGroup,
- ...(transactionGroup.primaryTransaction.custodyId = '1'),
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ custodyId: '1',
+ },
};
const { queryByTestId } = renderWithProvider(
@@ -333,4 +338,57 @@ describe('TransactionListItem', () => {
expect(cancelButton).not.toBeInTheDocument();
});
});
+
+ it('hides speed up button if status is approved', () => {
+ useSelector.mockImplementation(
+ generateUseSelectorRouter({
+ balance: '2AA1EFB94E0000',
+ }),
+ );
+
+ const transactionGroupSigning = {
+ ...transactionGroup,
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ status: TransactionStatus.approved,
+ },
+ };
+
+ const { queryByTestId } = renderWithProvider(
+ ,
+ );
+
+ const speedUpButton = queryByTestId('speed-up-button');
+ expect(speedUpButton).not.toBeInTheDocument();
+ });
+
+ it('aborts transaction signing if cancel button clicked and status is approved', () => {
+ useSelector.mockImplementation(
+ generateUseSelectorRouter({
+ balance: '2AA1EFB94E0000',
+ }),
+ );
+
+ useDispatch.mockReturnValue(jest.fn());
+
+ const transactionGroupSigning = {
+ ...transactionGroup,
+ primaryTransaction: {
+ ...transactionGroup.primaryTransaction,
+ status: TransactionStatus.approved,
+ },
+ };
+
+ const { queryByTestId } = renderWithProvider(
+ ,
+ );
+
+ const cancelButton = queryByTestId('cancel-button');
+ fireEvent.click(cancelButton);
+
+ expect(abortTransactionSigning).toHaveBeenCalledTimes(1);
+ expect(abortTransactionSigning).toHaveBeenCalledWith(
+ transactionGroupSigning.primaryTransaction.id,
+ );
+ });
});
diff --git a/ui/components/app/transaction-list/transaction-list.component.js b/ui/components/app/transaction-list/transaction-list.component.js
index 6cf6fc4c0939..e8719969ea44 100644
--- a/ui/components/app/transaction-list/transaction-list.component.js
+++ b/ui/components/app/transaction-list/transaction-list.component.js
@@ -6,7 +6,7 @@ import {
nonceSortedCompletedTransactionsSelector,
nonceSortedPendingTransactionsSelector,
} from '../../../selectors/transactions';
-import { getCurrentChainId, getSelectedAddress } from '../../../selectors';
+import { getCurrentChainId, getSelectedAccount } from '../../../selectors';
import { useI18nContext } from '../../../hooks/useI18nContext';
import TransactionListItem from '../transaction-list-item';
import SmartTransactionListItem from '../transaction-list-item/smart-transaction-list-item.component';
@@ -113,7 +113,7 @@ export default function TransactionList({
nonceSortedCompletedTransactionsSelector,
);
const chainId = useSelector(getCurrentChainId);
- const selectedAddress = useSelector(getSelectedAddress);
+ const { address: selectedAddress } = useSelector(getSelectedAccount);
const renderDateStamp = (index, dateGroup) => {
return index === 0 ? (
`;
-exports[`TransactionStatusLabel Component should render PENDING properly when status is APPROVED 1`] = `
+exports[`TransactionStatusLabel Component should render QUEUED properly 1`] = `
`;
-exports[`TransactionStatusLabel Component should render QUEUED properly 1`] = `
+exports[`TransactionStatusLabel Component should render SIGNING if status is approved 1`] = `
`;
diff --git a/ui/components/app/transaction-status-label/index.scss b/ui/components/app/transaction-status-label/index.scss
index 79e14bc20d77..cc0cf5d2c8cd 100644
--- a/ui/components/app/transaction-status-label/index.scss
+++ b/ui/components/app/transaction-status-label/index.scss
@@ -13,6 +13,7 @@
}
&--unapproved,
+ &--signing,
&--pending {
color: var(--color-warning-default);
}
diff --git a/ui/components/app/transaction-status-label/transaction-status-label.js b/ui/components/app/transaction-status-label/transaction-status-label.js
index 7c912007152e..bb5824acb05d 100644
--- a/ui/components/app/transaction-status-label/transaction-status-label.js
+++ b/ui/components/app/transaction-status-label/transaction-status-label.js
@@ -7,6 +7,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import { TransactionGroupStatus } from '../../../../shared/constants/transaction';
const QUEUED_PSEUDO_STATUS = 'queued';
+const SIGNING_PSUEDO_STATUS = 'signing';
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
const CUSTODIAN_PSEUDO_STATUS = 'inCustody';
///: END:ONLY_INCLUDE_IF
@@ -24,7 +25,6 @@ const CUSTODIAN_PSEUDO_STATUS = 'inCustody';
const pendingStatusHash = {
[TransactionStatus.submitted]: TransactionGroupStatus.pending,
[TransactionStatus.approved]: TransactionGroupStatus.pending,
- [TransactionStatus.signed]: TransactionGroupStatus.pending,
};
const statusToClassNameHash = {
@@ -40,6 +40,20 @@ const statusToClassNameHash = {
///: END:ONLY_INCLUDE_IF
};
+function getStatusKey(status, isEarliestNonce) {
+ if (status === TransactionStatus.approved) {
+ return SIGNING_PSUEDO_STATUS;
+ }
+
+ if (pendingStatusHash[status]) {
+ return isEarliestNonce
+ ? TransactionGroupStatus.pending
+ : QUEUED_PSEUDO_STATUS;
+ }
+
+ return status;
+}
+
export default function TransactionStatusLabel({
status,
date,
@@ -53,14 +67,8 @@ export default function TransactionStatusLabel({
///: END:ONLY_INCLUDE_IF
}) {
const t = useI18nContext();
+ const statusKey = getStatusKey(status, isEarliestNonce);
let tooltipText = error?.rpc?.message || error?.message;
- let statusKey = status;
- if (pendingStatusHash[status]) {
- statusKey = isEarliestNonce
- ? TransactionGroupStatus.pending
- : QUEUED_PSEUDO_STATUS;
- }
-
let statusText = statusKey && t(statusKey);
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
diff --git a/ui/components/app/transaction-status-label/transaction-status-label.test.js b/ui/components/app/transaction-status-label/transaction-status-label.test.js
index 28f6cd17bdc9..e05dee4808aa 100644
--- a/ui/components/app/transaction-status-label/transaction-status-label.test.js
+++ b/ui/components/app/transaction-status-label/transaction-status-label.test.js
@@ -2,6 +2,7 @@ import React from 'react';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { EthAccountType, EthMethod } from '@metamask/keyring-api';
+import { TransactionStatus } from '@metamask/transaction-controller';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
import TransactionStatusLabel from '.';
@@ -46,11 +47,11 @@ describe('TransactionStatusLabel Component', () => {
expect(container).toMatchSnapshot();
});
- it('should render PENDING properly when status is APPROVED', () => {
+ it('should render PENDING properly', () => {
const props = {
- status: 'approved',
+ date: 'June 1',
+ status: TransactionStatus.submitted,
isEarliestNonce: true,
- error: { message: 'test-title' },
};
const { container } = renderWithProvider(
@@ -61,11 +62,10 @@ describe('TransactionStatusLabel Component', () => {
expect(container).toMatchSnapshot();
});
- it('should render PENDING properly', () => {
+ it('should render QUEUED properly', () => {
const props = {
- date: 'June 1',
- status: 'submitted',
- isEarliestNonce: true,
+ status: TransactionStatus.submitted,
+ isEarliestNonce: false,
};
const { container } = renderWithProvider(
@@ -76,9 +76,9 @@ describe('TransactionStatusLabel Component', () => {
expect(container).toMatchSnapshot();
});
- it('should render QUEUED properly', () => {
+ it('should render UNAPPROVED properly', () => {
const props = {
- status: 'queued',
+ status: TransactionStatus.unapproved,
};
const { container } = renderWithProvider(
@@ -89,9 +89,9 @@ describe('TransactionStatusLabel Component', () => {
expect(container).toMatchSnapshot();
});
- it('should render UNAPPROVED properly', () => {
+ it('should render SIGNING if status is approved', () => {
const props = {
- status: 'unapproved',
+ status: TransactionStatus.approved,
};
const { container } = renderWithProvider(
diff --git a/ui/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js
index 0c4ae6b44478..78ba3730d2c7 100644
--- a/ui/components/app/whats-new-popup/whats-new-popup.js
+++ b/ui/components/app/whats-new-popup/whats-new-popup.js
@@ -17,7 +17,6 @@ import {
NOTIFICATION_OPEN_BETA_SNAPS,
NOTIFICATION_U2F_LEDGER_LIVE,
getTranslatedUINotifications,
- NOTIFICATION_STAKING_PORTFOLIO,
} from '../../../../shared/notifications';
import { I18nContext } from '../../../contexts/i18n';
import { MetaMetricsContext } from '../../../contexts/metametrics';
@@ -132,9 +131,6 @@ function getActionFunctionById(id, history) {
[NOTIFICATION_U2F_LEDGER_LIVE]: () => {
updateViewedNotifications({ [NOTIFICATION_U2F_LEDGER_LIVE]: true });
},
- [NOTIFICATION_STAKING_PORTFOLIO]: () => {
- updateViewedNotifications({ [NOTIFICATION_STAKING_PORTFOLIO]: true });
- },
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
[NOTIFICATION_BLOCKAID_DEFAULT]: () => {
updateViewedNotifications({ [NOTIFICATION_BLOCKAID_DEFAULT]: true });
@@ -371,7 +367,6 @@ export default function WhatsNewPopup({ onClose }) {
[NOTIFICATION_OPEN_BETA_SNAPS]: renderFirstNotification,
[NOTIFICATION_BUY_SELL_BUTTON]: renderFirstNotification,
[NOTIFICATION_U2F_LEDGER_LIVE]: renderFirstNotification,
- [NOTIFICATION_STAKING_PORTFOLIO]: renderFirstNotification,
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
[NOTIFICATION_BLOCKAID_DEFAULT]: renderFirstNotification,
///: END:ONLY_INCLUDE_IF
diff --git a/ui/components/component-library/avatar-base/README.mdx b/ui/components/component-library/avatar-base/README.mdx
index 0c5b22e10824..527bb95dba37 100644
--- a/ui/components/component-library/avatar-base/README.mdx
+++ b/ui/components/component-library/avatar-base/README.mdx
@@ -59,13 +59,13 @@ The `AvatarBase` component can contain images, icons or text
```jsx
import { AvatarBase } from '../../component-library';
-
+
-
+
A
```
diff --git a/ui/components/component-library/avatar-base/avatar-base.stories.tsx b/ui/components/component-library/avatar-base/avatar-base.stories.tsx
index 1a8536fcf2cc..a890f418a213 100644
--- a/ui/components/component-library/avatar-base/avatar-base.stories.tsx
+++ b/ui/components/component-library/avatar-base/avatar-base.stories.tsx
@@ -112,13 +112,13 @@ export const Size: StoryFn = (args) => (
export const Children: StoryFn = (args) => (
-
+
-
+
A
{
const args = {
- src: './images/eth_logo.png',
+ src: './images/eth_logo.svg',
name: 'test',
};
diff --git a/ui/components/component-library/avatar-network/README.mdx b/ui/components/component-library/avatar-network/README.mdx
index 1d903e464615..f2db6d4ad227 100644
--- a/ui/components/component-library/avatar-network/README.mdx
+++ b/ui/components/component-library/avatar-network/README.mdx
@@ -74,7 +74,7 @@ import { AvatarNetwork } from '../../component-library';
-
+
diff --git a/ui/components/component-library/avatar-network/__snapshots__/avatar-network.test.tsx.snap b/ui/components/component-library/avatar-network/__snapshots__/avatar-network.test.tsx.snap
index b186d4aa0206..053fae825a3e 100644
--- a/ui/components/component-library/avatar-network/__snapshots__/avatar-network.test.tsx.snap
+++ b/ui/components/component-library/avatar-network/__snapshots__/avatar-network.test.tsx.snap
@@ -9,7 +9,7 @@ exports[`AvatarNetwork should render correctly 1`] = `
diff --git a/ui/components/component-library/avatar-network/avatar-network.stories.tsx b/ui/components/component-library/avatar-network/avatar-network.stories.tsx
index d4928ff405db..04265930331f 100644
--- a/ui/components/component-library/avatar-network/avatar-network.stories.tsx
+++ b/ui/components/component-library/avatar-network/avatar-network.stories.tsx
@@ -95,10 +95,10 @@ Name.args = {
export const Src: StoryFn
= (args) => (
-
+
-
+
diff --git a/ui/components/component-library/avatar-network/avatar-network.test.tsx b/ui/components/component-library/avatar-network/avatar-network.test.tsx
index 27efe0948e24..ce7e5574cf45 100644
--- a/ui/components/component-library/avatar-network/avatar-network.test.tsx
+++ b/ui/components/component-library/avatar-network/avatar-network.test.tsx
@@ -13,7 +13,7 @@ import { AvatarNetwork, AvatarNetworkSize } from '.';
describe('AvatarNetwork', () => {
const args = {
name: 'ethereum',
- src: './images/eth_logo.png',
+ src: './images/eth_logo.svg',
showHalo: false,
};
diff --git a/ui/components/component-library/avatar-token/README.mdx b/ui/components/component-library/avatar-token/README.mdx
index 5587f0c22059..847751bb2072 100644
--- a/ui/components/component-library/avatar-token/README.mdx
+++ b/ui/components/component-library/avatar-token/README.mdx
@@ -72,7 +72,7 @@ Use the `src` prop to set the image to be rendered of the `AvatarToken`.
```jsx
import { AvatarToken } from '../../component-library';
-
+
@@ -92,7 +92,7 @@ Use the `showHalo` prop to display the component with halo effect. Only works if
```jsx
import { AvatarToken } from '../../component-library';
- ;
+ ;
```
### Color, Background Color And Border Color
diff --git a/ui/components/component-library/avatar-token/avatar-token.stories.tsx b/ui/components/component-library/avatar-token/avatar-token.stories.tsx
index 85c452bea69a..efedf954987d 100644
--- a/ui/components/component-library/avatar-token/avatar-token.stories.tsx
+++ b/ui/components/component-library/avatar-token/avatar-token.stories.tsx
@@ -56,7 +56,7 @@ export default {
},
args: {
name: 'eth',
- src: './images/eth_logo.png',
+ src: './images/eth_logo.svg',
size: AvatarTokenSize.Md,
showHalo: false,
},
@@ -121,7 +121,7 @@ export const SizeStory: StoryFn = (args) => (
= (args) => (
= (args) => (
= (args) => (
= (args) => (
= (args) => (
-
+
}
@@ -56,14 +56,14 @@ import {
}
>
@@ -72,7 +72,7 @@ import {
}
@@ -125,7 +125,7 @@ import {
}
@@ -216,7 +216,7 @@ import {
}
@@ -228,7 +228,7 @@ import {
}
@@ -241,7 +241,7 @@ import {
}
@@ -254,7 +254,7 @@ import {
}
@@ -292,7 +292,7 @@ import {
}
diff --git a/ui/components/component-library/badge-wrapper/badge-wrapper.stories.tsx b/ui/components/component-library/badge-wrapper/badge-wrapper.stories.tsx
index 230524c876f8..1be4c474f4d1 100644
--- a/ui/components/component-library/badge-wrapper/badge-wrapper.stories.tsx
+++ b/ui/components/component-library/badge-wrapper/badge-wrapper.stories.tsx
@@ -70,7 +70,7 @@ const Template: ComponentStory = (args) => (
}
@@ -95,7 +95,7 @@ export const Children: ComponentStory = () => (
}
@@ -107,14 +107,14 @@ export const Children: ComponentStory = () => (
}
>
@@ -123,7 +123,7 @@ export const Children: ComponentStory = () => (
}
@@ -147,7 +147,7 @@ export const Badge: ComponentStory = () => (
}
@@ -215,7 +215,7 @@ export const Position: ComponentStory = () => (
}
@@ -227,7 +227,7 @@ export const Position: ComponentStory = () => (
}
@@ -240,7 +240,7 @@ export const Position: ComponentStory = () => (
}
@@ -253,7 +253,7 @@ export const Position: ComponentStory = () => (
}
@@ -270,7 +270,7 @@ export const PositionObj: ComponentStory = () => (
}
diff --git a/ui/components/component-library/icon/icon.types.ts b/ui/components/component-library/icon/icon.types.ts
index 5d8acd901da7..7ad8e2d5fd62 100644
--- a/ui/components/component-library/icon/icon.types.ts
+++ b/ui/components/component-library/icon/icon.types.ts
@@ -171,7 +171,7 @@ export enum IconName {
Bold = 'bold',
CircleX = 'circle-x',
Download = 'download',
- File = 'file',
+ FileIcon = 'file',
Flask = 'flask',
Plug = 'plug',
Share = 'share',
diff --git a/ui/components/component-library/picker-network/README.mdx b/ui/components/component-library/picker-network/README.mdx
index 2a46c0b60a07..96377c2ddac3 100644
--- a/ui/components/component-library/picker-network/README.mdx
+++ b/ui/components/component-library/picker-network/README.mdx
@@ -26,7 +26,7 @@ Use the `label` prop for the text content of the `PickerNetwork` component. For
```jsx
import { PickerNetwork } from '../../ui/component-library';
-
+
@@ -44,7 +44,7 @@ Use the `src` prop with an image url to render the `AvatarNetwork`. Use the `ava
```jsx
import { PickerNetwork } from '../../ui/component-library';
-
+
```
@@ -60,9 +60,9 @@ The width of the `PickerNetwork` is set to auto by default. Use the style utilit
import { PickerNetwork } from '../../ui/component-library';
import { BlockSize } from '../../../helpers/constants/design-system';
- ;
+ ;
;
diff --git a/ui/components/component-library/picker-network/picker-network.stories.tsx b/ui/components/component-library/picker-network/picker-network.stories.tsx
index 91536945bc1c..b426b5a28a1b 100644
--- a/ui/components/component-library/picker-network/picker-network.stories.tsx
+++ b/ui/components/component-library/picker-network/picker-network.stories.tsx
@@ -28,7 +28,7 @@ export default {
},
args: {
label: 'Avalanche C-Chain',
- src: './images/avax-token.png',
+ src: './images/avax-token.svg',
},
} as Meta;
@@ -66,7 +66,7 @@ export const Src: StoryFn = (args) => (
diff --git a/ui/components/component-library/picker-network/picker-network.test.tsx b/ui/components/component-library/picker-network/picker-network.test.tsx
index a942276c4ab0..ce1c9d553296 100644
--- a/ui/components/component-library/picker-network/picker-network.test.tsx
+++ b/ui/components/component-library/picker-network/picker-network.test.tsx
@@ -17,12 +17,12 @@ describe('PickerNetwork', () => {
,
);
const image = screen.getByRole('img');
expect(image).toBeDefined();
- expect(image).toHaveAttribute('src', './images/matic-token.png');
+ expect(image).toHaveAttribute('src', './images/matic-token.svg');
});
it('should render avatar network inside the PickerNetwork with custom props', () => {
const container = (
diff --git a/ui/components/component-library/text-field/text-field.stories.tsx b/ui/components/component-library/text-field/text-field.stories.tsx
index c5985de98fa6..4de3e956fb61 100644
--- a/ui/components/component-library/text-field/text-field.stories.tsx
+++ b/ui/components/component-library/text-field/text-field.stories.tsx
@@ -239,7 +239,7 @@ export const StartAccessoryEndAccessory = (args) => {
>
ETH
diff --git a/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
index cf7f85bf6b35..1baeb3e635a8 100644
--- a/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
+++ b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { MetaMetricsContext } from '../../../contexts/metametrics';
import { hideModal } from '../../../store/actions';
-import { getSelectedAddress } from '../../../selectors/selectors';
+import { getSelectedInternalAccount } from '../../../selectors/selectors';
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
import {
Box,
@@ -43,7 +43,7 @@ const InteractiveReplacementTokenModal = () => {
const { custodians } = useSelector(
(state) => state.metamask.mmiConfiguration,
);
- const address = useSelector(getSelectedAddress);
+ const { address } = useSelector(getSelectedInternalAccount);
const custodyAccountDetails = useSelector(
(state) =>
state.metamask.custodyAccountDetails[toChecksumHexAddress(address)],
diff --git a/ui/components/institutional/interactive-replacement-token-notification/interactive-replacement-token-notification.js b/ui/components/institutional/interactive-replacement-token-notification/interactive-replacement-token-notification.js
index 55da0f9a723e..d8edd4fa9392 100644
--- a/ui/components/institutional/interactive-replacement-token-notification/interactive-replacement-token-notification.js
+++ b/ui/components/institutional/interactive-replacement-token-notification/interactive-replacement-token-notification.js
@@ -1,7 +1,10 @@
import React, { useState, useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PropTypes from 'prop-types';
-import { getCurrentKeyring, getSelectedAddress } from '../../../selectors';
+import {
+ getCurrentKeyring,
+ getSelectedInternalAccount,
+} from '../../../selectors';
import { getInteractiveReplacementToken } from '../../../selectors/institutional/selectors';
import { getIsUnlocked } from '../../../ducks/metamask/metamask';
import { useI18nContext } from '../../../hooks/useI18nContext';
@@ -34,7 +37,7 @@ const InteractiveReplacementTokenNotification = ({ isVisible }) => {
const mmiActions = mmiActionsFactory();
const keyring = useSelector(getCurrentKeyring);
- const address = useSelector(getSelectedAddress);
+ const { address } = useSelector(getSelectedInternalAccount);
const isUnlocked = useSelector(getIsUnlocked);
const interactiveReplacementToken = useSelector(
getInteractiveReplacementToken,
diff --git a/ui/components/multichain/account-details/account-details-display.js b/ui/components/multichain/account-details/account-details-display.js
index a3a6b9b0154e..dd86398c79af 100644
--- a/ui/components/multichain/account-details/account-details-display.js
+++ b/ui/components/multichain/account-details/account-details-display.js
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
-import QrView from '../../ui/qr-code';
+import QrCodeView from '../../ui/qr-code-view';
import EditableLabel from '../../ui/editable-label/editable-label';
import { setAccountLabel } from '../../../store/actions';
@@ -70,7 +70,7 @@ export const AccountDetailsDisplay = ({
}}
accounts={accounts}
/>
-
+
{exportPrivateKeyFeatureEnabled ? (
{
const t = useI18nContext();
+ const [showSelectDisableWarn, setShowDisableSelectWarn] = useState(false);
const [privateKeyCopied, handlePrivateKeyCopy] = useCopyToClipboard();
return (
@@ -50,13 +56,22 @@ export const AccountDetailsKey = ({ accountName, onClose, privateKey }) => {
variant={TextVariant.bodySm}
style={{ wordBreak: 'break-word' }}
>
- {privateKey}
+ setShowDisableSelectWarn(true)}>
+
+
handlePrivateKeyCopy(privateKey)}
+ onClick={() =>
+ setShowDisableSelectWarn(false) || handlePrivateKeyCopy(privateKey)
+ }
iconName={privateKeyCopied ? IconName.CopySuccess : IconName.Copy}
/>
+ {showSelectDisableWarn && (
+
+ For your safety, selecting this text is not available right now.
+
+ )}
{t('privateKeyWarning')}
diff --git a/ui/components/multichain/account-details/account-details.js b/ui/components/multichain/account-details/account-details.js
index f62532120757..93035c5832f2 100644
--- a/ui/components/multichain/account-details/account-details.js
+++ b/ui/components/multichain/account-details/account-details.js
@@ -29,9 +29,10 @@ import {
Modal,
ModalOverlay,
Text,
+ ModalContent,
+ ModalHeader,
+ ModalBody,
} from '../../component-library';
-import { ModalContent } from '../../component-library/modal-content/deprecated';
-import { ModalHeader } from '../../component-library/modal-header/deprecated';
import { AddressCopyButton } from '../address-copy-button';
import { AccountDetailsAuthenticate } from './account-details-authenticate';
import { AccountDetailsDisplay } from './account-details-display';
@@ -72,7 +73,11 @@ export const AccountDetails = ({ address }) => {
return (
<>
{/* This is the Modal that says "Show private key" on top and has a few states */}
-
+
{
>
{attemptingExport ? t('showPrivateKey') : avatar}
- {attemptingExport ? (
- <>
-
- {avatar}
-
+ {attemptingExport ? (
+ <>
+
- {name}
-
-
-
- {privateKey ? (
-
- ) : (
-
- )}
- >
- ) : (
- setAttemptingExport(true)}
- />
- )}
+ {avatar}
+
+ {name}
+
+
+
+ {privateKey ? (
+
+ ) : (
+
+ )}
+ >
+ ) : (
+ setAttemptingExport(true)}
+ />
+ )}
+
diff --git a/ui/components/multichain/account-details/account-details.test.js b/ui/components/multichain/account-details/account-details.test.js
index 547be20f8553..027ba1518303 100644
--- a/ui/components/multichain/account-details/account-details.test.js
+++ b/ui/components/multichain/account-details/account-details.test.js
@@ -1,3 +1,4 @@
+import { LavaDomeDebug } from '@lavamoat/lavadome-core';
import { toChecksumHexAddress } from '@metamask/controller-utils';
import { fireEvent, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -93,16 +94,22 @@ describe('AccountDetails', () => {
it('displays the private key when sent in props', () => {
const samplePrivateKey = '8675309';
+ const textHook = 'FIND_ME';
const { queryByText } = renderWithProvider(
- ,
+ ,
);
- expect(queryByText(samplePrivateKey)).toBeInTheDocument();
+ const hook = queryByText(textHook);
+ const rootNode = hook.parentElement.querySelector('span span');
+ expect(LavaDomeDebug.getTextByRoot(rootNode)).toContain(samplePrivateKey);
});
it('should call AccountDetails.onClose()', () => {
diff --git a/ui/components/multichain/activity-list-item/activity-list-item.stories.js b/ui/components/multichain/activity-list-item/activity-list-item.stories.js
index dd3ca5718e05..9dedaf56f0df 100644
--- a/ui/components/multichain/activity-list-item/activity-list-item.stories.js
+++ b/ui/components/multichain/activity-list-item/activity-list-item.stories.js
@@ -44,7 +44,7 @@ DefaultStory.args = {
data-testid="activity-tx-network-badge"
size={AvatarNetworkSize.Xs}
name="Network Name"
- src="./images/eth_logo.png"
+ src="./images/eth_logo.svg"
borderWidth={1}
borderColor={BackgroundColor.backgroundDefault}
/>
diff --git a/ui/components/multichain/address-copy-button/address-copy-button.js b/ui/components/multichain/address-copy-button/address-copy-button.js
index ce92fa26ac32..9ae846d1fafd 100644
--- a/ui/components/multichain/address-copy-button/address-copy-button.js
+++ b/ui/components/multichain/address-copy-button/address-copy-button.js
@@ -4,7 +4,7 @@ import classnames from 'classnames';
import { toChecksumHexAddress } from '@metamask/controller-utils';
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
import { useSelector } from 'react-redux';
-import { getSelectedAddress } from '../../../selectors';
+import { getSelectedInternalAccount } from '../../../selectors';
import {
getIsCustodianSupportedChain,
getCustodianIconForAddress,
@@ -41,7 +41,7 @@ export const AddressCopyButton = ({
const t = useI18nContext();
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- const selectedAddress = useSelector(getSelectedAddress);
+ const { address: selectedAddress } = useSelector(getSelectedInternalAccount);
const custodianIcon = useSelector((state) =>
getCustodianIconForAddress(state, selectedAddress),
);
diff --git a/ui/components/multichain/app-footer/__snapshots__/app-footer.test.js.snap b/ui/components/multichain/app-footer/__snapshots__/app-footer.test.js.snap
deleted file mode 100644
index d9942c751d76..000000000000
--- a/ui/components/multichain/app-footer/__snapshots__/app-footer.test.js.snap
+++ /dev/null
@@ -1,61 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`App Footer should match snapshot 1`] = `
-
-
-
-`;
diff --git a/ui/components/multichain/app-footer/app-footer-actions.tsx b/ui/components/multichain/app-footer/app-footer-actions.tsx
deleted file mode 100644
index ab5cba45bedc..000000000000
--- a/ui/components/multichain/app-footer/app-footer-actions.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Action } from 'redux';
-import * as actionConstants from '../../../store/actionConstants';
-
-export function showSelectActionModal(): Action {
- return {
- type: actionConstants.SELECT_ACTION_MODAL_OPEN,
- };
-}
-
-export function hideSelectActionModal(): Action {
- return {
- type: actionConstants.SELECT_ACTION_MODAL_CLOSE,
- };
-}
diff --git a/ui/components/multichain/app-footer/app-footer.js b/ui/components/multichain/app-footer/app-footer.js
deleted file mode 100644
index 1c366a18eb1a..000000000000
--- a/ui/components/multichain/app-footer/app-footer.js
+++ /dev/null
@@ -1,222 +0,0 @@
-import React from 'react';
-import { useHistory, useLocation } from 'react-router-dom';
-import { useDispatch, useSelector } from 'react-redux';
-import {
- ALL_CONNECTIONS,
- CONNECTIONS,
- DEFAULT_ROUTE,
-} from '../../../helpers/constants/routes';
-import {
- AvatarFavicon,
- AvatarNetwork,
- AvatarNetworkSize,
- BadgeWrapper,
- Box,
- ButtonIcon,
- ButtonIconSize,
- Icon,
- IconName,
- IconSize,
- Text,
-} from '../../component-library';
-import { useI18nContext } from '../../../hooks/useI18nContext';
-import {
- AlignItems,
- BackgroundColor,
- BlockSize,
- BorderColor,
- BorderRadius,
- Display,
- FlexDirection,
- IconColor,
- JustifyContent,
- Size,
- TextColor,
- TextVariant,
-} from '../../../helpers/constants/design-system';
-import {
- getConnectedSubjectsForAllAddresses,
- getCurrentNetwork,
- getOriginOfCurrentTab,
- getSelectedAddress,
- getTestNetworkBackgroundColor,
-} from '../../../selectors';
-import { getEnvironmentType } from '../../../../app/scripts/lib/util';
-import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app';
-import { showSelectActionModal } from './app-footer-actions';
-
-export const AppFooter = () => {
- const t = useI18nContext();
- const location = useLocation();
- const dispatch = useDispatch();
- const history = useHistory();
-
- const activeWallet = location.pathname === DEFAULT_ROUTE;
- const activeConnections = location.pathname === CONNECTIONS;
- const isUnlocked = useSelector((state) => state.metamask.isUnlocked);
- const isFullScreen = getEnvironmentType() === ENVIRONMENT_TYPE_FULLSCREEN;
- const selectedAddress = useSelector(getSelectedAddress);
-
- const currentTabOrigin = useSelector(getOriginOfCurrentTab);
- const connectedSites = useSelector(getConnectedSubjectsForAllAddresses);
- const connectedSite = connectedSites[selectedAddress]?.find(
- ({ origin }) => origin === currentTabOrigin,
- );
- const connectedAvatar = connectedSite?.iconUrl;
- const connectedAvatarName = connectedSite?.name;
-
- const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
-
- const currentChain = useSelector(getCurrentNetwork);
-
- return (
- <>
- {isUnlocked ? (
- <>
-
-
- {
- e.preventDefault();
- history.push(DEFAULT_ROUTE);
- }}
- className="app-footer__button"
- width={BlockSize.OneThird}
- padding={2}
- display={Display.Flex}
- flexDirection={FlexDirection.Column}
- alignItems={AlignItems.center}
- tabIndex={0}
- >
-
-
- {t('wallet')}
-
-
-
- dispatch(showSelectActionModal())}
- ariaLabel={t('selectActionButton')}
- />
-
- {
- e.preventDefault();
- history.push(isFullScreen ? ALL_CONNECTIONS : CONNECTIONS);
- }}
- className="app-footer__button"
- width={BlockSize.OneThird}
- padding={2}
- display={Display.Flex}
- flexDirection={FlexDirection.Column}
- alignItems={AlignItems.center}
- tabIndex={0}
- >
- {connectedSite ? (
-
-
- }
- >
-
-
-
- ) : (
-
- )}
-
- {t('connections')}
-
-
-
-
- >
- ) : null}
- >
- );
-};
diff --git a/ui/components/multichain/app-footer/app-footer.stories.js b/ui/components/multichain/app-footer/app-footer.stories.js
deleted file mode 100644
index 7ad32b8c5d8a..000000000000
--- a/ui/components/multichain/app-footer/app-footer.stories.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react';
-import { Provider } from 'react-redux';
-import testData from '../../../../.storybook/test-data';
-import configureStore from '../../../store/store';
-import { AppFooter } from '.';
-
-const customNetworkData = {
- ...testData,
- activeTab: {
- id: 1111,
- title: 'Uniswap',
- origin: 'https://app.uniswap.org',
- protocol: 'https:',
- url: 'https://app.uniswap.org/',
- },
- metamask: {
- ...testData.metamask,
- providerConfig: {
- chainId: '0x1',
- },
- selectedAddress: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
- subjectMetadata: {
- ...testData.metamask.subjectMetadata,
- 'https://app.uniswap.org': {
- extensionId: null,
- iconUrl: 'https://app.uniswap.org/favicon.png',
- name: 'Uniswap',
- origin: 'https://app.uniswap.org',
- subjectType: 'website',
- },
- },
- },
-};
-const customNetworkStore = configureStore(customNetworkData);
-
-export default {
- title: 'Components/Multichain/AppFooter',
-};
-export const DefaultStory = () => ;
-DefaultStory.storyName = 'Default';
-
-export const ConnectedStory = () => ;
-ConnectedStory.storyName = 'Connected';
-ConnectedStory.decorators = [
- (Story) => (
-
-
-
- ),
-];
diff --git a/ui/components/multichain/app-footer/app-footer.test.js b/ui/components/multichain/app-footer/app-footer.test.js
deleted file mode 100644
index d6b3e82a5146..000000000000
--- a/ui/components/multichain/app-footer/app-footer.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import React from 'react';
-import configureStore from '../../../store/store';
-import { renderWithProvider } from '../../../../test/lib/render-helpers';
-import mockState from '../../../../test/data/mock-state.json';
-import { AppFooter } from '.';
-
-const store = configureStore({
- ...mockState,
- activeTab: {
- origin: 'https://remix.ethereum.org',
- },
-});
-
-describe('App Footer', () => {
- it('should match snapshot', () => {
- const { container } = renderWithProvider( , store);
- expect(container).toMatchSnapshot();
- });
-
- it('should render correctly', () => {
- const { queryByTestId } = renderWithProvider( , store);
-
- expect(queryByTestId('app-footer')).toBeDefined();
- });
-});
diff --git a/ui/components/multichain/app-footer/index.js b/ui/components/multichain/app-footer/index.js
deleted file mode 100644
index 3475241e8569..000000000000
--- a/ui/components/multichain/app-footer/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { AppFooter } from './app-footer';
diff --git a/ui/components/multichain/app-footer/index.scss b/ui/components/multichain/app-footer/index.scss
deleted file mode 100644
index dac248d579e4..000000000000
--- a/ui/components/multichain/app-footer/index.scss
+++ /dev/null
@@ -1,41 +0,0 @@
-.app-footer {
- $height-screen-sm-max: 100%;
- $width-screen-sm-min: 85vw;
- $width-screen-md-min: 80vw;
- $width-screen-lg-min: 62vw;
-
- bottom: 0;
- position: sticky;
- z-index: 55; // we are applying same z-index for header as well
- min-height: 64px;
- flex-flow: column nowrap;
-
- &__contents {
- height: 64px;
- box-shadow: var(--shadow-size-md) var(--color-shadow-default);
-
- @include screen-sm-max {
- height: $height-screen-sm-max;
- }
-
- @include screen-sm-min {
- width: $width-screen-sm-min;
- margin-bottom: 10vh; // same as main container
- }
-
- @include screen-md-min {
- width: $width-screen-md-min;
- }
-
- @include screen-lg-min {
- width: $width-screen-lg-min;
- }
- }
-
- &__actions-button {
- &:hover,
- &:focus {
- background-color: var(--color-primary-default);
- }
- }
-}
diff --git a/ui/components/multichain/app-header/app-header.js b/ui/components/multichain/app-header/app-header.js
index 0b4fdb5cf754..f5efcb66a351 100644
--- a/ui/components/multichain/app-header/app-header.js
+++ b/ui/components/multichain/app-header/app-header.js
@@ -96,6 +96,8 @@ export const AppHeader = ({ location }) => {
const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
// Used for copy button
+
+ // During onboarding there is no selected internal account
const currentAddress = internalAccount?.address;
const checksummedCurrentAddress = toChecksumHexAddress(currentAddress);
const [copied, handleCopy] = useCopyToClipboard(MINUTE);
diff --git a/ui/components/multichain/avatar-group/__snapshots__/avatar-group.test.tsx.snap b/ui/components/multichain/avatar-group/__snapshots__/avatar-group.test.tsx.snap
index dbba54f9e6d8..59ad45e3a299 100644
--- a/ui/components/multichain/avatar-group/__snapshots__/avatar-group.test.tsx.snap
+++ b/ui/components/multichain/avatar-group/__snapshots__/avatar-group.test.tsx.snap
@@ -19,7 +19,7 @@ exports[`AvatarGroup should render AvatarGroup component 1`] = `
@@ -47,7 +47,7 @@ exports[`AvatarGroup should render AvatarGroup component 1`] = `
@@ -61,7 +61,7 @@ exports[`AvatarGroup should render AvatarGroup component 1`] = `
diff --git a/ui/components/multichain/avatar-group/avatar-group.stories.tsx b/ui/components/multichain/avatar-group/avatar-group.stories.tsx
index f4397c18eb21..01b95ffa4f7c 100644
--- a/ui/components/multichain/avatar-group/avatar-group.stories.tsx
+++ b/ui/components/multichain/avatar-group/avatar-group.stories.tsx
@@ -15,10 +15,10 @@ export default {
},
args: {
members: [
- { symbol: 'ETH', iconUrl: './images/eth_logo.png' },
- { symbol: 'MATIC', iconUrl: './images/matic-token.png' },
+ { symbol: 'ETH', iconUrl: './images/eth_logo.svg' },
+ { symbol: 'MATIC', iconUrl: './images/matic-token.svg' },
{ symbol: 'OP', iconUrl: './images/optimism.svg' },
- { symbol: 'AVAX', iconUrl: './images/avax-token.png' },
+ { symbol: 'AVAX', iconUrl: './images/avax-token.svg' },
],
limit: 4,
},
@@ -34,10 +34,10 @@ export const WithTag: StoryFn
= (args) => (
);
WithTag.args = {
members: [
- { symbol: 'ETH', iconUrl: './images/eth_logo.png' },
- { symbol: 'MATIC', iconUrl: './images/matic-token.png' },
+ { symbol: 'ETH', iconUrl: './images/eth_logo.svg' },
+ { symbol: 'MATIC', iconUrl: './images/matic-token.svg' },
{ symbol: 'OP', iconUrl: './images/optimism.svg' },
- { symbol: 'AVAX', iconUrl: './images/avax-token.png' },
+ { symbol: 'AVAX', iconUrl: './images/avax-token.svg' },
{ symbol: 'PALM', iconUrl: './images/palm.svg' },
],
limit: 2,
diff --git a/ui/components/multichain/avatar-group/avatar-group.test.tsx b/ui/components/multichain/avatar-group/avatar-group.test.tsx
index 76f6b12347da..fb140e472334 100644
--- a/ui/components/multichain/avatar-group/avatar-group.test.tsx
+++ b/ui/components/multichain/avatar-group/avatar-group.test.tsx
@@ -5,10 +5,10 @@ import React from 'react';
import { AvatarGroup } from './avatar-group';
const members = [
- { symbol: 'ETH', iconUrl: './images/eth_logo.png' },
- { symbol: 'MATIC', iconUrl: './images/matic-token.png' },
+ { symbol: 'ETH', iconUrl: './images/eth_logo.svg' },
+ { symbol: 'MATIC', iconUrl: './images/matic-token.svg' },
{ symbol: 'OP', iconUrl: './images/optimism.svg' },
- { symbol: 'AVAX', iconUrl: './images/avax-token.png' },
+ { symbol: 'AVAX', iconUrl: './images/avax-token.svg' },
{ symbol: 'PALM', iconUrl: './images/palm.svg' },
];
diff --git a/ui/components/multichain/balance-overview/__snapshots__/balance-overview.test.js.snap b/ui/components/multichain/balance-overview/__snapshots__/balance-overview.test.js.snap
deleted file mode 100644
index e839f4f988f8..000000000000
--- a/ui/components/multichain/balance-overview/__snapshots__/balance-overview.test.js.snap
+++ /dev/null
@@ -1,87 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Balance Overview and Portfolio for Tokens should output correct ETH total value 1`] = `
-
-
-
-
-
-
- 0.0013
-
-
- ETH
-
-
-
-
-
- Portfolio
-
-
-
-
-`;
-
-exports[`Balance Overview and Portfolio for Tokens should output correct USD total value 1`] = `
-
-
-
-
-
-
- $2.05
-
-
- USD
-
-
-
-
-
- Portfolio
-
-
-
-
-`;
diff --git a/ui/components/multichain/balance-overview/balance-overview.js b/ui/components/multichain/balance-overview/balance-overview.js
deleted file mode 100644
index 6baeddb95ed6..000000000000
--- a/ui/components/multichain/balance-overview/balance-overview.js
+++ /dev/null
@@ -1,164 +0,0 @@
-import React, { useContext } from 'react';
-import { useSelector } from 'react-redux';
-import classnames from 'classnames';
-import PropTypes from 'prop-types';
-import { useI18nContext } from '../../../hooks/useI18nContext';
-import { MetaMetricsContext } from '../../../contexts/metametrics';
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
-} from '../../../../shared/constants/metametrics';
-import { Box, ButtonSecondary, IconName, Text } from '../../component-library';
-///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
-import {
- getMmiPortfolioEnabled,
- getMmiPortfolioUrl,
-} from '../../../selectors/institutional/selectors';
-///: END:ONLY_INCLUDE_IF
-///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
-import { getPortfolioUrl } from '../../../helpers/utils/portfolio';
-///: END:ONLY_INCLUDE_IF
-import {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- getCurrentChainId,
- getMetaMetricsId,
- ///: END:ONLY_INCLUDE_IF
- isBalanceCached,
-} from '../../../selectors';
-import Spinner from '../../ui/spinner';
-import {
- AlignItems,
- Display,
- JustifyContent,
- TextColor,
- TextVariant,
-} from '../../../helpers/constants/design-system';
-///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
-import { CURRENCY_SYMBOLS } from '../../../../shared/constants/network';
-///: END:ONLY_INCLUDE_IF
-import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display';
-import { PRIMARY } from '../../../helpers/constants/common';
-
-export const BalanceOverview = ({ balance, loading }) => {
- const trackEvent = useContext(MetaMetricsContext);
- const t = useI18nContext();
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- const metaMetricsId = useSelector(getMetaMetricsId);
- const chainId = useSelector(getCurrentChainId);
- ///: END:ONLY_INCLUDE_IF
- const balanceIsCached = useSelector(isBalanceCached);
-
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- const mmiPortfolioEnabled = useSelector(getMmiPortfolioEnabled);
- const mmiPortfolioUrl = useSelector(getMmiPortfolioUrl);
-
- const portfolioEvent = () => {
- trackEvent({
- category: MetaMetricsEventCategory.Navigation,
- event: MetaMetricsEventName.MMIPortfolioButtonClicked,
- });
- };
- const renderInstitutionalButtons = () => {
- return mmiPortfolioEnabled ? (
- {
- portfolioEvent();
- window.open(mmiPortfolioUrl, '_blank');
- }}
- endIconName={IconName.Export}
- >
- {t('portfolio')}
-
- ) : null;
- };
-
- ///: END:ONLY_INCLUDE_IF
-
- return (
-
-
- {balance ? (
-
- {loading ? (
- ''
- ) : (
-
- )}
-
- ) : (
-
- )}
-
- {balanceIsCached ? (
- *
- ) : null}
-
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- renderInstitutionalButtons()
- ///: END:ONLY_INCLUDE_IF
- }
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- {
- const url = getPortfolioUrl(
- '',
- 'ext_portfolio_button',
- metaMetricsId,
- );
- global.platform.openTab({ url });
- trackEvent({
- category: MetaMetricsEventCategory.Navigation,
- event: MetaMetricsEventName.PortfolioLinkClicked,
- properties: {
- location: 'Home',
- text: 'Portfolio',
- chain_id: chainId,
- token_symbol: CURRENCY_SYMBOLS.ETH,
- },
- });
- }}
- >
- {t('portfolio')}
-
- ///: END:ONLY_INCLUDE_IF
- }
-
- );
-};
-
-BalanceOverview.propTypes = {
- /**
- * String balance of the account
- */
- balance: PropTypes.string.isRequired,
- /**
- * Represents if the token values are currently loading
- */
- loading: PropTypes.bool.isRequired,
-};
diff --git a/ui/components/multichain/balance-overview/balance-overview.stories.js b/ui/components/multichain/balance-overview/balance-overview.stories.js
deleted file mode 100644
index 38ae249a2979..000000000000
--- a/ui/components/multichain/balance-overview/balance-overview.stories.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-import { BalanceOverview } from '.';
-
-export default {
- title: 'Components/Multichain/BalanceOverview',
- component: BalanceOverview,
-};
-
-export const DefaultStory = () => ;
-
-DefaultStory.storyName = 'Default';
diff --git a/ui/components/multichain/balance-overview/balance-overview.test.js b/ui/components/multichain/balance-overview/balance-overview.test.js
deleted file mode 100644
index d64d231a6850..000000000000
--- a/ui/components/multichain/balance-overview/balance-overview.test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from 'react';
-import { screen } from '@testing-library/react';
-import configureStore from '../../../store/store';
-import { renderWithProvider } from '../../../../test/lib/render-helpers';
-import mockState from '../../../../test/data/mock-state.json';
-import { BalanceOverview } from '.';
-
-const render = (useNativeCurrencyAsPrimaryCurrency = true) => {
- const store = configureStore({
- ...mockState,
- metamask: {
- ...mockState.metamask,
- currencyRates: {
- ETH: {
- conversionRate: 1618,
- },
- },
- preferences: {
- ...mockState.metamask.preferences,
- showFiatInTestnets: true,
- useNativeCurrencyAsPrimaryCurrency,
- },
- },
- });
- return renderWithProvider(
- ,
- store,
- );
-};
-
-describe('Balance Overview and Portfolio for Tokens', () => {
- it('should output correct ETH total value', () => {
- const { container } = render();
- expect(container).toMatchSnapshot();
- expect(screen.getByText('0.0013')).toBeInTheDocument();
- });
-
- it('should output correct USD total value', () => {
- const { container } = render(false);
- expect(container).toMatchSnapshot();
- expect(screen.getByText('$2.05')).toBeInTheDocument();
- });
-});
diff --git a/ui/components/multichain/balance-overview/index.js b/ui/components/multichain/balance-overview/index.js
deleted file mode 100644
index 08baf1b10da8..000000000000
--- a/ui/components/multichain/balance-overview/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { BalanceOverview } from './balance-overview';
diff --git a/ui/components/multichain/connected-site-menu/__snapshots__/connected-site-menu.test.js.snap b/ui/components/multichain/connected-site-menu/__snapshots__/connected-site-menu.test.js.snap
index 83a1eef2c854..ef7886fcbc19 100644
--- a/ui/components/multichain/connected-site-menu/__snapshots__/connected-site-menu.test.js.snap
+++ b/ui/components/multichain/connected-site-menu/__snapshots__/connected-site-menu.test.js.snap
@@ -18,16 +18,21 @@ exports[`Connected Site Menu should render the site menu in connected state 1`]
-
+
+
+
@@ -55,16 +60,21 @@ exports[`Connected Site Menu should render the site menu in not connected state
-
+
+
+
@@ -92,13 +102,18 @@ exports[`Connected Site Menu should render the site menu in not connected to cur
-
+
+
+
(
);
-IconStory.args = { iconSrc: './images/matic-token.png', name: 'Polygon' };
+IconStory.args = { iconSrc: './images/matic-token.svg', name: 'Polygon' };
export const SelectedStory = (args) => (
{
return nonTestNetworks;
}
- // Reorder nonTestNetworks based on the order of chainIds in orderedNetworksList
- const sortedNetworkList = orderedNetworksList
- .map((chainId) =>
- nonTestNetworks.find((network) => network.chainId === chainId),
- )
- .filter(Boolean);
+ // Create a mapping of chainId to index in orderedNetworksList
+ const orderedIndexMap = {};
+ orderedNetworksList.forEach((network, index) => {
+ orderedIndexMap[`${network.networkId}_${network.networkRpcUrl}`] = index;
+ });
+
+ // Sort nonTestNetworks based on the order in orderedNetworksList
+ const sortedNonTestNetworks = nonTestNetworks.sort((a, b) => {
+ const keyA = `${a.chainId}_${a.rpcUrl}`;
+ const keyB = `${b.chainId}_${b.rpcUrl}`;
+ return orderedIndexMap[keyA] - orderedIndexMap[keyB];
+ });
- return sortedNetworkList;
+ return sortedNonTestNetworks;
};
const networksList = newOrderNetworks();
const [items, setItems] = useState([...networksList]);
+
useEffect(() => {
if (currentlyOnTestNetwork) {
dispatch(setShowTestNetworks(currentlyOnTestNetwork));
@@ -124,13 +132,20 @@ export const NetworkListMenu = ({ onClose }) => {
if (!result.destination) {
return;
}
+
const newItems = [...items];
const [removed] = newItems.splice(result.source.index, 1);
newItems.splice(result.destination.index, 0, removed);
- setItems(newItems);
- const orderedArray = newItems.map((obj) => obj.chainId);
+
+ // Convert the updated array back to NetworksInfo format
+ const orderedArray = newItems.map((obj) => ({
+ networkId: obj.chainId, // Assuming chainId is the networkId
+ networkRpcUrl: obj.rpcUrl,
+ }));
dispatch(updateNetworksList(orderedArray));
+
+ setItems(newItems);
};
let searchResults =
@@ -161,7 +176,9 @@ export const NetworkListMenu = ({ onClose }) => {
return null;
}
- const isCurrentNetwork = currentNetwork.id === network.id;
+ const isCurrentNetwork =
+ currentNetwork.id === network.id &&
+ currentNetwork.rpcUrl === network.rpcUrl;
const canDeleteNetwork =
isUnlocked && !isCurrentNetwork && network.removable;
@@ -410,6 +427,7 @@ export const NetworkListMenu = ({ onClose }) => {
{
if (isFullScreen) {
diff --git a/ui/components/multichain/nft-item/nft-item.stories.js b/ui/components/multichain/nft-item/nft-item.stories.js
index 1bda206b5dc0..16b60bae47ff 100644
--- a/ui/components/multichain/nft-item/nft-item.stories.js
+++ b/ui/components/multichain/nft-item/nft-item.stories.js
@@ -31,7 +31,7 @@ export default {
name: 'Monkey Trip #2422',
src: 'https://i.seadn.io/gcs/files/878e670c38e0f02e58bf730c51c30d0c.jpg',
networkName: 'Ethereum Mainnet',
- networkSrc: './images/eth_logo.png',
+ networkSrc: './images/eth_logo.svg',
tokenId: '2422',
},
};
diff --git a/ui/components/multichain/receive-modal/receive-modal.js b/ui/components/multichain/receive-modal/receive-modal.js
index 5ef666fdba48..4b0ab95433b5 100644
--- a/ui/components/multichain/receive-modal/receive-modal.js
+++ b/ui/components/multichain/receive-modal/receive-modal.js
@@ -9,10 +9,10 @@ import {
Modal,
ModalOverlay,
Text,
+ ModalContent,
+ ModalHeader,
} from '../../component-library';
-import { ModalContent } from '../../component-library/modal-content/deprecated';
-import { ModalHeader } from '../../component-library/modal-header/deprecated';
-import QrView from '../../ui/qr-code';
+import QrCodeView from '../../ui/qr-code-view';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { getMetaMaskAccountsOrdered, getUseBlockie } from '../../../selectors';
import {
@@ -66,7 +66,7 @@ export const ReceiveModal = ({ address, onClose }) => {
alignItems={AlignItems.center}
flexDirection={FlexDirection.Column}
>
-
+
diff --git a/ui/components/multichain/select-action-modal-item/__snapshots__/select-action-item.test.js.snap b/ui/components/multichain/select-action-modal-item/__snapshots__/select-action-item.test.js.snap
deleted file mode 100644
index 812192d386d8..000000000000
--- a/ui/components/multichain/select-action-modal-item/__snapshots__/select-action-item.test.js.snap
+++ /dev/null
@@ -1,45 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`SelectActionModalItem should render correctly 1`] = `
-
-
-
-
-
-
- Buy crypto with MetaMask
-
-
-
-
-`;
diff --git a/ui/components/multichain/select-action-modal-item/index.js b/ui/components/multichain/select-action-modal-item/index.js
deleted file mode 100644
index 5246bae93b5b..000000000000
--- a/ui/components/multichain/select-action-modal-item/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { SelectActionModalItem } from './select-action-modal-item';
diff --git a/ui/components/multichain/select-action-modal-item/index.scss b/ui/components/multichain/select-action-modal-item/index.scss
deleted file mode 100644
index a65f55e4c924..000000000000
--- a/ui/components/multichain/select-action-modal-item/index.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.select-action-modal-item {
- &:hover,
- &:focus-within {
- background-color: var(--color-background-default-hover);
- }
-}
diff --git a/ui/components/multichain/select-action-modal-item/select-action-item.test.js b/ui/components/multichain/select-action-modal-item/select-action-item.test.js
deleted file mode 100644
index 0febb1abc648..000000000000
--- a/ui/components/multichain/select-action-modal-item/select-action-item.test.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-import { render } from '@testing-library/react';
-
-import { IconName } from '../../component-library';
-import { SelectActionModalItem } from '.';
-
-describe('SelectActionModalItem', () => {
- it('should render correctly', () => {
- const props = {
- showIcon: true,
- primaryText: 'Buy',
- secondaryText: 'Buy crypto with MetaMask',
- actionIcon: IconName.Add,
- };
- const { container, getByTestId } = render(
- ,
- );
- expect(container).toMatchSnapshot();
- expect(getByTestId('select-action-modal-item')).toBeDefined();
- });
-});
diff --git a/ui/components/multichain/select-action-modal-item/select-action-modal-item.js b/ui/components/multichain/select-action-modal-item/select-action-modal-item.js
deleted file mode 100644
index d227e510e65e..000000000000
--- a/ui/components/multichain/select-action-modal-item/select-action-modal-item.js
+++ /dev/null
@@ -1,112 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import {
- AlignItems,
- BackgroundColor,
- BlockSize,
- Display,
- FlexDirection,
- IconColor,
- TextAlign,
- TextVariant,
-} from '../../../helpers/constants/design-system';
-import {
- AvatarIcon,
- AvatarIconSize,
- Box,
- Icon,
- IconName,
- IconSize,
- Text,
-} from '../../component-library';
-
-export const SelectActionModalItem = ({
- actionIcon,
- onClick,
- showIcon,
- primaryText,
- secondaryText,
- disabled,
- ...props
-}) => {
- if (disabled) {
- return null;
- }
- return (
- {
- e.preventDefault();
- onClick();
- }}
- className="select-action-modal-item"
- data-testid="select-action-modal-item"
- width={BlockSize.Full}
- {...props}
- >
-
-
-
-
-
-
- {primaryText}
-
- {showIcon && (
-
- )}
-
-
- {secondaryText}
-
-
-
- );
-};
-
-SelectActionModalItem.propTypes = {
- /**
- * Show link icon with text
- */
- showIcon: PropTypes.bool,
- /**
- * onClick handler for each action
- */
- onClick: PropTypes.func.isRequired,
- /**
- * Icon for each action Item
- */
- actionIcon: PropTypes.string.isRequired,
- /**
- * Title for each action Item
- */
- primaryText: PropTypes.string.isRequired,
- /**
- * Description for each action Item
- */
- secondaryText: PropTypes.string.isRequired,
- /**
- * Disable bridge and swap for selected networks
- */
- disabled: PropTypes.bool,
-};
diff --git a/ui/components/multichain/select-action-modal-item/select-action-modal-item.stories.js b/ui/components/multichain/select-action-modal-item/select-action-modal-item.stories.js
deleted file mode 100644
index a0b8aa43158c..000000000000
--- a/ui/components/multichain/select-action-modal-item/select-action-modal-item.stories.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import React from 'react';
-import { IconName } from '../../component-library';
-import { SelectActionModalItem } from '.';
-
-export default {
- title: 'Components/Multichain/SelectActionModalItem',
- component: SelectActionModalItem,
- argTypes: {
- showIcon: {
- control: 'boolean',
- },
- primaryText: {
- control: 'text',
- },
- actionIcon: {
- control: 'text',
- },
- secondaryText: {
- control: 'text',
- },
- onClick: {
- action: 'onClick',
- },
- },
- args: {
- showIcon: true,
- primaryText: 'Buy',
- secondaryText: 'Buy crypto with MetaMask',
- actionIcon: IconName.Add,
- },
-};
-
-export const DefaultStory = (args) => ;
-
-DefaultStory.storyName = 'Default';
diff --git a/ui/components/multichain/select-action-modal/index.js b/ui/components/multichain/select-action-modal/index.js
deleted file mode 100644
index 84119c0ca18c..000000000000
--- a/ui/components/multichain/select-action-modal/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { SelectActionModal } from './select-action-modal';
diff --git a/ui/components/multichain/select-action-modal/select-action-modal.js b/ui/components/multichain/select-action-modal/select-action-modal.js
deleted file mode 100644
index 4d75a607e545..000000000000
--- a/ui/components/multichain/select-action-modal/select-action-modal.js
+++ /dev/null
@@ -1,251 +0,0 @@
-import React, { useContext } from 'react';
-import PropTypes from 'prop-types';
-import { useDispatch, useSelector } from 'react-redux';
-import {
- useHistory,
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- useLocation,
- ///: END:ONLY_INCLUDE_IF
-} from 'react-router-dom';
-import { Box, IconName, Modal, ModalOverlay } from '../../component-library';
-import { ModalContent } from '../../component-library/modal-content/deprecated';
-import { ModalHeader } from '../../component-library/modal-header/deprecated';
-import { SelectActionModalItem } from '../select-action-modal-item';
-///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
-import useRamps from '../../../hooks/experiences/useRamps';
-import { getPortfolioUrl } from '../../../helpers/utils/portfolio';
-///: END:ONLY_INCLUDE_IF
-import { MetaMetricsContext } from '../../../contexts/metametrics';
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- MetaMetricsSwapsEventSource,
- ///: END:ONLY_INCLUDE_IF
-} from '../../../../shared/constants/metametrics';
-import {
- getCurrentChainId,
- getIsSwapsChain,
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- getSwapsDefaultToken,
- getCurrentKeyring,
- getIsBridgeChain,
- getIsBuyableChain,
- getMetaMetricsId,
- ///: END:ONLY_INCLUDE_IF
-} from '../../../selectors';
-import {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- BUILD_QUOTE_ROUTE,
- ///: END:ONLY_INCLUDE_IF
- SEND_ROUTE,
-} from '../../../helpers/constants/routes';
-import { startNewDraftTransaction } from '../../../ducks/send';
-import { I18nContext } from '../../../contexts/i18n';
-import { AssetType } from '../../../../shared/constants/transaction';
-///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
-import { getMmiPortfolioUrl } from '../../../selectors/institutional/selectors';
-///: END:ONLY_INCLUDE_IF
-
-///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
-import { setSwapsFromToken } from '../../../ducks/swaps/swaps';
-import { isHardwareKeyring } from '../../../helpers/utils/hardware';
-///: END:ONLY_INCLUDE_IF
-import { CURRENCY_SYMBOLS } from '../../../../shared/constants/network';
-
-export const SelectActionModal = ({ onClose }) => {
- const dispatch = useDispatch();
- const t = useContext(I18nContext);
- const trackEvent = useContext(MetaMetricsContext);
- const history = useHistory();
- const chainId = useSelector(getCurrentChainId);
- const isSwapsChain = useSelector(getIsSwapsChain);
-
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- const location = useLocation();
- const { openBuyCryptoInPdapp } = useRamps();
- const defaultSwapsToken = useSelector(getSwapsDefaultToken);
- const keyring = useSelector(getCurrentKeyring);
- const usingHardwareWallet = isHardwareKeyring(keyring?.type);
- const isBridgeChain = useSelector(getIsBridgeChain);
- const metaMetricsId = useSelector(getMetaMetricsId);
- const isBuyableChain = useSelector(getIsBuyableChain);
-
- ///: END:ONLY_INCLUDE_IF
-
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- const mmiPortfolioUrl = useSelector(getMmiPortfolioUrl);
-
- const stakingEvent = () => {
- trackEvent({
- category: MetaMetricsEventCategory.Navigation,
- event: MetaMetricsEventName.MMIPortfolioButtonClicked,
- });
- };
- ///: END:ONLY_INCLUDE_IF
-
- return (
-
-
-
-
- {t('selectAnAction')}
-
-
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- {
- openBuyCryptoInPdapp();
- trackEvent({
- event: MetaMetricsEventName.NavBuyButtonClicked,
- category: MetaMetricsEventCategory.Navigation,
- properties: {
- location: 'Home',
- text: 'Buy',
- chain_id: chainId,
- token_symbol: defaultSwapsToken,
- },
- });
- onClose();
- }}
- />
- ///: END:ONLY_INCLUDE_IF
- }
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- {
- stakingEvent();
- global.platform.openTab({
- url: `${mmiPortfolioUrl}/stake`,
- });
- onClose();
- }}
- />
- ///: END:ONLY_INCLUDE_IF
- }
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
- global.platform.openTab({
- url: `${mmiPortfolioUrl}/swap`,
- });
- ///: END:ONLY_INCLUDE_IF
-
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- if (isSwapsChain) {
- trackEvent({
- event: MetaMetricsEventName.NavSwapButtonClicked,
- category: MetaMetricsEventCategory.Swaps,
- properties: {
- token_symbol: CURRENCY_SYMBOLS.ETH,
- location: MetaMetricsSwapsEventSource.MainView,
- text: 'Swap',
- chain_id: chainId,
- },
- });
- dispatch(setSwapsFromToken(defaultSwapsToken));
- if (usingHardwareWallet) {
- global.platform.openExtensionInBrowser(BUILD_QUOTE_ROUTE);
- } else {
- history.push(BUILD_QUOTE_ROUTE);
- }
- }
- ///: END:ONLY_INCLUDE_IF
- onClose();
- }}
- data-testid="select-action-modal-item-swap"
- />
- {
- trackEvent({
- event: MetaMetricsEventName.NavSendButtonClicked,
- category: MetaMetricsEventCategory.Navigation,
- properties: {
- token_symbol: CURRENCY_SYMBOLS.ETH,
- location: 'Home',
- text: 'Send',
- chain_id: chainId,
- },
- });
- await dispatch(
- startNewDraftTransaction({ type: AssetType.native }),
- );
- history.push(SEND_ROUTE);
- onClose();
- }}
- data-testid="select-action-modal-item-send"
- />
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
- {
- if (isBridgeChain) {
- const portfolioUrl = getPortfolioUrl(
- 'bridge',
- 'ext_bridge_button',
- metaMetricsId,
- );
- global.platform.openTab({
- url: `${portfolioUrl}${
- location.pathname.includes('asset') ? '&token=native' : ''
- }`,
- });
- trackEvent({
- category: MetaMetricsEventCategory.Navigation,
- event: MetaMetricsEventName.BridgeLinkClicked,
- properties: {
- location: 'Home',
- text: 'Bridge',
- chain_id: chainId,
- token_symbol: CURRENCY_SYMBOLS.ETH,
- },
- });
- }
- onClose();
- }}
- />
- ///: END:ONLY_INCLUDE_IF
- }
-
-
-
- );
-};
-
-SelectActionModal.propTypes = {
- /**
- * onClose handler for Modal
- */
- onClose: PropTypes.func,
-};
diff --git a/ui/components/multichain/select-action-modal/select-action-modal.stories.js b/ui/components/multichain/select-action-modal/select-action-modal.stories.js
deleted file mode 100644
index 300db40d4c25..000000000000
--- a/ui/components/multichain/select-action-modal/select-action-modal.stories.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-import { SelectActionModal } from '.';
-
-export default {
- title: 'Components/Multichain/SelectActionModal',
- component: SelectActionModal,
-};
-
-export const DefaultStory = () => ;
-
-DefaultStory.storyName = 'Default';
diff --git a/ui/components/multichain/select-action-modal/select-action-modal.test.js b/ui/components/multichain/select-action-modal/select-action-modal.test.js
deleted file mode 100644
index c10e3eabae3f..000000000000
--- a/ui/components/multichain/select-action-modal/select-action-modal.test.js
+++ /dev/null
@@ -1,300 +0,0 @@
-import React from 'react';
-import configureMockStore from 'redux-mock-store';
-import thunk from 'redux-thunk';
-import { fireEvent, waitFor } from '@testing-library/react';
-import { EthAccountType, EthMethod } from '@metamask/keyring-api';
-import mockState from '../../../../test/data/mock-state.json';
-
-import { renderWithProvider } from '../../../../test/jest/rendering';
-
-import { KeyringType } from '../../../../shared/constants/keyring';
-import { CHAIN_IDS } from '../../../../shared/constants/network';
-import { SelectActionModal } from '.';
-
-const NETWORK_CONSTANTS_PATH = '../../../../shared/constants/network';
-
-// Mock BUYABLE_CHAINS_MAP
-jest.mock(NETWORK_CONSTANTS_PATH, () => {
- const networkConstants = jest.requireActual(NETWORK_CONSTANTS_PATH);
- const { BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME } = jest.requireActual(
- '../../../../shared/constants/network',
- );
-
- return {
- ...networkConstants,
- BUYABLE_CHAINS_MAP: {
- // MAINNET
- [networkConstants.CHAIN_IDS.MAINNET]: {
- nativeCurrency: networkConstants.ETH_SYMBOL,
- network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
- },
- // POLYGON
- [networkConstants.CHAIN_IDS.POLYGON]: {
- nativeCurrency: networkConstants.POLYGON_SYMBOL,
- network:
- networkConstants.BUYABLE_CHAINS_MAP[
- networkConstants.CHAIN_IDS.POLYGON
- ].network,
- },
- },
- };
-});
-let openTabSpy;
-
-describe('Select Action Modal', () => {
- beforeAll(() => {
- jest.clearAllMocks();
- Object.defineProperty(global, 'platform', {
- value: {
- openTab: jest.fn(),
- },
- });
- openTabSpy = jest.spyOn(global.platform, 'openTab');
- });
-
- beforeEach(() => {
- openTabSpy.mockClear();
- });
-
- const mockStore = {
- metamask: {
- providerConfig: {
- type: 'test',
- chainId: CHAIN_IDS.MAINNET,
- ticker: 'ETH',
- },
- accountsByChainId: {
- '0x1': {
- '0x1': { balance: '0x1F4' },
- },
- },
- preferences: {
- useNativeCurrencyAsPrimaryCurrency: true,
- },
- useCurrencyRateCheck: true,
- currencyRates: {
- ETH: {
- conversionRate: 2,
- },
- },
- identities: {
- '0x1': {
- address: '0x1',
- },
- },
- accounts: {
- '0x1': {
- address: '0x1',
- balance: '0x1F4',
- },
- },
- internalAccounts: {
- accounts: {
- 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
- address: '0x1',
- id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
- metadata: {
- name: 'Test Account',
- keyring: {
- type: KeyringType.imported,
- },
- },
- options: {},
- methods: [...Object.values(EthMethod)],
- type: EthAccountType.Eoa,
- },
- },
- selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
- },
- keyrings: [
- {
- type: KeyringType.imported,
- accounts: ['0x1', '0x2'],
- },
- {
- type: KeyringType.ledger,
- accounts: [],
- },
- ],
- contractExchangeRates: {},
- },
- };
- const store = configureMockStore([thunk])(mockState);
-
- it('should render correctly', () => {
- const { getByTestId } = renderWithProvider( , store);
-
- expect(getByTestId('select-action-modal')).toBeDefined();
- });
-
- it('should have the Buy & Sell native token enabled if chain id is part of supported buyable chains', () => {
- const mockedStoreWithBuyableChainId = {
- metamask: {
- ...mockStore.metamask,
- providerConfig: { type: 'test', chainId: CHAIN_IDS.POLYGON },
- },
- };
- const mockedStore = configureMockStore([thunk])(
- mockedStoreWithBuyableChainId,
- );
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- expect(queryByText('Buy & Sell')).toBeInTheDocument();
- });
-
- it('should open the Buy & Sell native token URI when clicking on Buy button for a buyable chain ID', async () => {
- const mockedStoreWithBuyableChainId = {
- metamask: {
- ...mockStore.metamask,
- providerConfig: { type: 'test', chainId: CHAIN_IDS.POLYGON },
- },
- };
- const mockedStore = configureMockStore([thunk])(
- mockedStoreWithBuyableChainId,
- );
- const onClose = jest.fn();
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- const buyAndSellButton = queryByText('Buy & Sell');
- expect(buyAndSellButton).toBeInTheDocument();
- expect(buyAndSellButton).not.toBeDisabled();
-
- fireEvent.click(buyAndSellButton);
- expect(onClose).toHaveBeenCalledTimes(1);
- expect(openTabSpy).toHaveBeenCalledTimes(1);
-
- await waitFor(() =>
- expect(openTabSpy).toHaveBeenCalledWith({
- url: expect.stringContaining(`/buy?metamaskEntry=ext_buy_sell_button`),
- }),
- );
- });
-
- it('should not have the Buy native token button if chain id is not part of supported buyable chains', () => {
- const mockedStoreWithUnbuyableChainId = {
- metamask: {
- ...mockStore.metamask,
- providerConfig: { type: 'test', chainId: CHAIN_IDS.FANTOM },
- },
- };
- const mockedStore = configureMockStore([thunk])(
- mockedStoreWithUnbuyableChainId,
- );
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- const buyAndSellButton = queryByText('Buy & Sell');
- expect(buyAndSellButton).not.toBeInTheDocument();
- });
- it('should have the Bridge button if chain id is a part of supported chains', () => {
- const mockedAvalancheStore = {
- ...mockStore,
- metamask: {
- ...mockStore.metamask,
- providerConfig: {
- ...mockStore.metamask.providerConfig,
- chainId: '0xa86a',
- },
- },
- };
- const mockedStore = configureMockStore([thunk])(mockedAvalancheStore);
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- const bridgeButton = queryByText('Bridge');
- expect(bridgeButton).toBeInTheDocument();
- });
- it('should open the Bridge URI when clicking on Bridge button on supported network', async () => {
- const onClose = jest.fn();
- const mockedAvalancheStore = {
- ...mockStore,
- metamask: {
- ...mockStore.metamask,
- providerConfig: {
- ...mockStore.metamask.providerConfig,
- chainId: '0xa86a',
- },
- },
- };
- const mockedStore = configureMockStore([thunk])(mockedAvalancheStore);
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
-
- const bridgeButton = queryByText('Bridge');
- expect(bridgeButton).toBeInTheDocument();
-
- fireEvent.click(bridgeButton);
- expect(onClose).toHaveBeenCalledTimes(1);
-
- expect(openTabSpy).toHaveBeenCalledTimes(1);
-
- await waitFor(() =>
- expect(openTabSpy).toHaveBeenCalledWith({
- url: expect.stringContaining('/bridge?metamaskEntry=ext_bridge_button'),
- }),
- );
- });
- it('should not have the Bridge button if chain id is not part of supported chains', () => {
- const mockedFantomStore = {
- ...mockStore,
- metamask: {
- ...mockStore.metamask,
- providerConfig: {
- ...mockStore.metamask.providerConfig,
- chainId: '0xfa',
- },
- },
- };
- const mockedStore = configureMockStore([thunk])(mockedFantomStore);
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- const buyButton = queryByText('Bridge');
- expect(buyButton).not.toBeInTheDocument();
- });
- it('should have the Swap button if chain id is part of supported buyable chains', () => {
- const mockedStoreWithSwapableChainId = {
- metamask: {
- ...mockStore.metamask,
- providerConfig: { type: 'test', chainId: CHAIN_IDS.POLYGON },
- },
- };
- const mockedStore = configureMockStore([thunk])(
- mockedStoreWithSwapableChainId,
- );
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- expect(queryByText('Swap')).toBeInTheDocument();
- });
- it('should have the Send button if chain id is part of supported buyable chains', () => {
- const mockedStoreWithSendChainId = {
- metamask: {
- ...mockStore.metamask,
- providerConfig: { type: 'test', chainId: CHAIN_IDS.POLYGON },
- },
- };
- const mockedStore = configureMockStore([thunk])(mockedStoreWithSendChainId);
-
- const { queryByText } = renderWithProvider(
- ,
- mockedStore,
- );
- expect(queryByText('Send')).toBeInTheDocument();
- });
-});
diff --git a/ui/components/multichain/token-list-item/__snapshots__/token-list-item.test.js.snap b/ui/components/multichain/token-list-item/__snapshots__/token-list-item.test.js.snap
index df718b429400..2d5fa9de4841 100644
--- a/ui/components/multichain/token-list-item/__snapshots__/token-list-item.test.js.snap
+++ b/ui/components/multichain/token-list-item/__snapshots__/token-list-item.test.js.snap
@@ -28,7 +28,7 @@ exports[`TokenListItem should render correctly 1`] = `
@@ -41,7 +41,7 @@ exports[`TokenListItem should render correctly 1`] = `
class="mm-box mm-box--display-flex mm-box--gap-1 mm-box--flex-direction-row mm-box--justify-content-space-between"
>
{
const t = useI18nContext();
const primaryTokenImage = useSelector(getNativeCurrencyImage);
const trackEvent = useContext(MetaMetricsContext);
- const metaMetricsId = useSelector(getMetaMetricsId);
const chainId = useSelector(getCurrentChainId);
// Scam warning
@@ -88,45 +82,7 @@ export const TokenListItem = ({
title === CURRENCY_SYMBOLS.ETH && isOriginalTokenSymbol
? t('networkNameEthereum')
: title;
- const stakeableTitle = (
- {
- e.preventDefault();
- e.stopPropagation();
- const url = getPortfolioUrl('stake', 'ext_stake_button', metaMetricsId);
- global.platform.openTab({ url });
- trackEvent({
- event: MetaMetricsEventName.StakingEntryPointClicked,
- category: MetaMetricsEventCategory.Tokens,
- properties: {
- location: 'Token List Item',
- text: 'Stake',
- chain_id: chainId,
- token_symbol: tokenSymbol,
- },
- });
- }}
- >
- •
-
- {t('stake')}
-
-
-
- );
+
// Used for badge icon
const currentNetwork = useSelector(getCurrentNetwork);
const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
@@ -204,10 +160,7 @@ export const TokenListItem = ({
justifyContent={JustifyContent.spaceBetween}
gap={1}
>
-
+
{title?.length > 12 ? (
- {isStakeable ? (
- <>
- {tokenSymbol} {stakeableTitle}
- >
- ) : (
- tokenSymbol
- )}
+ {tokenSymbol}
) : (
@@ -237,16 +184,11 @@ export const TokenListItem = ({
variant={TextVariant.bodyMd}
ellipsis
>
- {isStakeable ? (
-
- {tokenSymbol} {stakeableTitle}
-
- ) : (
- tokenSymbol
- )}
+ {tokenSymbol}
)}
+
{showScamWarning ? (
{secondary}
@@ -376,8 +317,4 @@ TokenListItem.propTypes = {
* isNativeCurrency represents if this item is the native currency
*/
isNativeCurrency: PropTypes.bool,
- /**
- * isStakeable represents if this item is stakeable
- */
- isStakeable: PropTypes.bool,
};
diff --git a/ui/components/multichain/token-list-item/token-list-item.stories.js b/ui/components/multichain/token-list-item/token-list-item.stories.js
index f104439f7656..0cf57ae7defc 100644
--- a/ui/components/multichain/token-list-item/token-list-item.stories.js
+++ b/ui/components/multichain/token-list-item/token-list-item.stories.js
@@ -34,7 +34,7 @@ export default {
args: {
secondary: '$9.80 USD',
primary: '88.0068',
- tokenImage: './images/eth_logo.png',
+ tokenImage: './images/eth_logo.svg',
tokenSymbol: CURRENCY_SYMBOLS.ETH,
title: 'Ethereum',
isOriginalTokenSymbol: true,
@@ -64,9 +64,6 @@ DefaultStory.decorators = [
),
];
-DefaultStory.args = {
- isStakeable: true,
-};
export const ChaosStory = (args) => (
{
- beforeAll(() => {
- global.platform = { openTab: jest.fn() };
- openTabSpy = jest.spyOn(global.platform, 'openTab');
- });
const props = {
onClick: jest.fn(),
};
@@ -65,28 +59,4 @@ describe('TokenListItem', () => {
expect(props.onClick).toHaveBeenCalled();
});
-
- it('handles clicking staking opens tab', async () => {
- const store = configureMockStore()(state);
- const { queryByTestId } = renderWithProvider(
-
,
- store,
- );
-
- const stakeButton = queryByTestId(
- `staking-entrypoint-${CHAIN_IDS.MAINNET}`,
- );
-
- expect(stakeButton).toBeInTheDocument();
- expect(stakeButton).not.toBeDisabled();
-
- fireEvent.click(stakeButton);
- expect(openTabSpy).toHaveBeenCalledTimes(1);
-
- await waitFor(() =>
- expect(openTabSpy).toHaveBeenCalledWith({
- url: expect.stringContaining('/stake?metamaskEntry=ext_stake_button'),
- }),
- );
- });
});
diff --git a/ui/components/ui/identicon/identicon.stories.js b/ui/components/ui/identicon/identicon.stories.js
index 0469ff50d3ff..eff3050a4cb5 100644
--- a/ui/components/ui/identicon/identicon.stories.js
+++ b/ui/components/ui/identicon/identicon.stories.js
@@ -40,7 +40,7 @@ WithImage.args = {
addBorder: false,
diameter: 32,
useBlockie: false,
- image: './images/eth_logo.png',
+ image: './images/eth_logo.svg',
alt: 'Ethereum',
imageBorder: true,
};
diff --git a/ui/components/ui/qr-code-view/index.js b/ui/components/ui/qr-code-view/index.js
new file mode 100644
index 000000000000..595b88011d6f
--- /dev/null
+++ b/ui/components/ui/qr-code-view/index.js
@@ -0,0 +1 @@
+export { default } from './qr-code-view';
diff --git a/ui/components/ui/qr-code/index.scss b/ui/components/ui/qr-code-view/index.scss
similarity index 100%
rename from ui/components/ui/qr-code/index.scss
rename to ui/components/ui/qr-code-view/index.scss
diff --git a/ui/components/ui/qr-code/qr-code.js b/ui/components/ui/qr-code-view/qr-code-view.js
similarity index 97%
rename from ui/components/ui/qr-code/qr-code.js
rename to ui/components/ui/qr-code-view/qr-code-view.js
index 7a9a7d6beffd..c10458e33bc9 100644
--- a/ui/components/ui/qr-code/qr-code.js
+++ b/ui/components/ui/qr-code-view/qr-code-view.js
@@ -4,7 +4,7 @@ import qrCode from 'qrcode-generator';
import { connect } from 'react-redux';
import { isHexPrefixed } from 'ethereumjs-util';
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
-import { AddressCopyButton } from '../../multichain/address-copy-button';
+import { AddressCopyButton } from '../../multichain';
import Box from '../box/box';
import { MetaMetricsContext } from '../../../contexts/metametrics';
import {
diff --git a/ui/components/ui/qr-code/qr-code.stories.js b/ui/components/ui/qr-code-view/qr-code-view.stories.js
similarity index 100%
rename from ui/components/ui/qr-code/qr-code.stories.js
rename to ui/components/ui/qr-code-view/qr-code-view.stories.js
diff --git a/ui/components/ui/qr-code/index.js b/ui/components/ui/qr-code/index.js
deleted file mode 100644
index 632ac037fc4b..000000000000
--- a/ui/components/ui/qr-code/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './qr-code';
diff --git a/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js b/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js
index 7337b387c286..cfee21b08452 100644
--- a/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js
+++ b/ui/components/ui/sender-to-recipient/sender-to-recipient.component.js
@@ -128,19 +128,13 @@ export function RecipientWithAddress({
);
}
- const displayName = petnamesEnabled ? (
-
- ) : (
+ const displayName =
(recipientName ||
recipientNickname ||
recipientMetadataName ||
recipientEns ||
shortenAddress(checksummedRecipientAddress)) ??
- (!addressOnly && t('newContract'))
- );
+ (!addressOnly && t('newContract'));
return (
<>
@@ -158,9 +152,11 @@ export function RecipientWithAddress({
}
}}
>
-
-
-
+ {!petnamesEnabled && (
+
+
+
+ )}
setAddressCopied(false)}
>
-
- {displayName}
-
+ {petnamesEnabled ? (
+
+ ) : (
+
+ {displayName}
+
+ )}
{showNicknamePopovers && !petnamesEnabled ? (
diff --git a/ui/components/ui/site-icon/site-icon.stories.js b/ui/components/ui/site-icon/site-icon.stories.js
index 893800cfa61a..bb1c7998ee7c 100644
--- a/ui/components/ui/site-icon/site-icon.stories.js
+++ b/ui/components/ui/site-icon/site-icon.stories.js
@@ -31,7 +31,7 @@ DefaultStory.storyName = 'Default';
DefaultStory.args = {
name: 'eth',
- icon: './images/eth_logo.png',
+ icon: './images/eth_logo.svg',
size: 24,
};
diff --git a/ui/components/ui/site-icon/site-icon.test.js b/ui/components/ui/site-icon/site-icon.test.js
index a78f2b8d0b81..f1e793c3ba51 100644
--- a/ui/components/ui/site-icon/site-icon.test.js
+++ b/ui/components/ui/site-icon/site-icon.test.js
@@ -6,7 +6,7 @@ describe('SiteIcon', () => {
const args = {
size: 32,
name: 'Snap name',
- icon: './images/eth_logo.png',
+ icon: './images/eth_logo.svg',
className: 'classname-test',
fallbackClassName: 'fallback-classname-test',
};
diff --git a/ui/components/ui/ui-components.scss b/ui/components/ui/ui-components.scss
index bf42cc2160bb..9039e2ecfced 100644
--- a/ui/components/ui/ui-components.scss
+++ b/ui/components/ui/ui-components.scss
@@ -36,7 +36,7 @@
@import 'page-container/index';
@import 'popover/index';
@import 'pulse-loader/index';
-@import 'qr-code/index';
+@import 'qr-code-view/index';
@import 'radio-group/index';
@import 'review-spending-cap/index';
@import 'sender-to-recipient/index';
diff --git a/ui/ducks/alerts/unconnected-account.js b/ui/ducks/alerts/unconnected-account.js
index a1cc12ba6058..64e7b1294bc0 100644
--- a/ui/ducks/alerts/unconnected-account.js
+++ b/ui/ducks/alerts/unconnected-account.js
@@ -6,9 +6,14 @@ import * as actionConstants from '../../store/actionConstants';
import {
addPermittedAccount,
setAlertEnabledness,
- setSelectedAddress,
+ setSelectedAccount,
+ setSelectedInternalAccount,
} from '../../store/actions';
-import { getOriginOfCurrentTab, getSelectedAddress } from '../../selectors';
+import {
+ getInternalAccount,
+ getOriginOfCurrentTab,
+ getSelectedInternalAccount,
+} from '../../selectors';
import { ALERT_STATE } from './enums';
// Constants
@@ -111,11 +116,14 @@ export const dismissAndDisableAlert = () => {
};
};
-export const switchToAccount = (address) => {
- return async (dispatch) => {
+export const switchToAccount = (accountId) => {
+ return async (dispatch, getState) => {
+ const state = getState();
try {
await dispatch(switchAccountRequested());
- await dispatch(setSelectedAddress(address));
+ await dispatch(setSelectedInternalAccount(accountId));
+ const internalAccount = getInternalAccount(state, accountId);
+ await dispatch(setSelectedAccount(internalAccount.address));
await dispatch(switchAccountSucceeded());
} catch (error) {
console.error(error);
@@ -128,7 +136,7 @@ export const switchToAccount = (address) => {
export const connectAccount = () => {
return async (dispatch, getState) => {
const state = getState();
- const selectedAddress = getSelectedAddress(state);
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
const origin = getOriginOfCurrentTab(state);
try {
await dispatch(connectAccountRequested());
diff --git a/ui/ducks/app/app.ts b/ui/ducks/app/app.ts
index b6d8c8892e59..40549c567055 100644
--- a/ui/ducks/app/app.ts
+++ b/ui/ducks/app/app.ts
@@ -39,7 +39,6 @@ interface AppState {
};
showKeyringRemovalSnapModal: boolean;
importTokensModalOpen: boolean;
- showSelectActionModal: boolean;
accountDetail: {
subview?: string;
accountExport?: string;
@@ -116,7 +115,6 @@ const initialState: AppState = {
},
showKeyringRemovalSnapModal: false,
importTokensModalOpen: false,
- showSelectActionModal: false,
accountDetail: {
privateKey: '',
},
@@ -227,18 +225,6 @@ export default function reduceApp(
importTokensModalOpen: false,
};
- case actionConstants.SELECT_ACTION_MODAL_OPEN:
- return {
- ...appState,
- showSelectActionModal: true,
- };
-
- case actionConstants.SELECT_ACTION_MODAL_CLOSE:
- return {
- ...appState,
- showSelectActionModal: false,
- };
-
// alert methods
case actionConstants.ALERT_OPEN:
return {
diff --git a/ui/ducks/metamask/metamask.js b/ui/ducks/metamask/metamask.js
index 885fe50b7eb8..08139af391be 100644
--- a/ui/ducks/metamask/metamask.js
+++ b/ui/ducks/metamask/metamask.js
@@ -44,6 +44,7 @@ const initialState = {
showFiatInTestnets: false,
showTestNetworks: false,
useNativeCurrencyAsPrimaryCurrency: true,
+ petnamesEnabled: true,
},
firstTimeFlowType: null,
completedOnboarding: false,
diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js
index 2257440b1e1a..724d620f9d35 100644
--- a/ui/ducks/send/send.js
+++ b/ui/ducks/send/send.js
@@ -45,7 +45,8 @@ import {
getIsMultiLayerFeeNetwork,
getEnsResolutionByAddress,
getSelectedAccount,
- getSelectedAddress,
+ getSelectedInternalAccount,
+ getSelectedInternalAccountWithBalance,
getUnapprovedTransactions,
} from '../../selectors';
import {
@@ -509,6 +510,7 @@ export const computeEstimatedGasLimit = createAsyncThunk(
const transaction = unapprovedTxs[draftTransaction.id];
const isNonStandardEthChain = getIsNonStandardEthChain(state);
const chainId = getCurrentChainId(state);
+ const selectedAccount = getSelectedInternalAccountWithBalance(state);
let gasTotalForLayer1;
if (isMultiLayerFeeNetwork) {
@@ -536,7 +538,7 @@ export const computeEstimatedGasLimit = createAsyncThunk(
const gasLimit = await estimateGasLimitForSend({
gasPrice: draftTransaction.gas.gasPrice,
blockGasLimit: metamask.currentBlockGasLimit,
- selectedAddress: metamask.selectedAddress,
+ selectedAddress: selectedAccount.address,
sendToken: draftTransaction.asset.details,
to: draftTransaction.recipient.address?.toLowerCase(),
value: draftTransaction.amount.value,
@@ -672,7 +674,8 @@ export const initializeSendState = createAsyncThunk(
blockGasLimit: metamask.currentBlockGasLimit,
selectedAddress:
draftTransaction.fromAccount?.address ??
- sendState.selectedAccount.address,
+ sendState.selectedAccount.address ??
+ account.address,
sendToken: draftTransaction.asset.details,
to: draftTransaction.recipient.address.toLowerCase(),
value: draftTransaction.amount.value,
@@ -1952,7 +1955,7 @@ export function updateRecipientUserInput(userInput) {
const sendingAddress =
draftTransaction.fromAccount?.address ??
state[name].selectedAccount.address ??
- getSelectedAddress(state);
+ getSelectedInternalAccount(state).address;
const chainId = getCurrentChainId(state);
const tokens = getTokens(state);
const useTokenDetection = getUseTokenDetection(state);
@@ -2074,7 +2077,7 @@ export function updateSendAsset(
const sendingAddress =
draftTransaction.fromAccount?.address ??
state[name].selectedAccount.address ??
- getSelectedAddress(state);
+ getSelectedInternalAccount(state).address;
const account = getTargetAccount(state, sendingAddress);
if (type === AssetType.native) {
const unapprovedTxs = getUnapprovedTransactions(state);
diff --git a/ui/helpers/constants/error-keys.js b/ui/helpers/constants/error-keys.js
index 7d3cb020f724..dfa4cc142806 100644
--- a/ui/helpers/constants/error-keys.js
+++ b/ui/helpers/constants/error-keys.js
@@ -7,3 +7,4 @@ export const GAS_PRICE_EXCESSIVE_ERROR_KEY = 'gasPriceExcessive';
export const UNSENDABLE_ASSET_ERROR_KEY = 'unsendableAsset';
export const INSUFFICIENT_FUNDS_FOR_GAS_ERROR_KEY = 'insufficientFundsForGas';
export const INVALID_ASSET_TYPE = 'invalidAssetType';
+export const IS_SIGNING_OR_SUBMITTING = 'isSigningOrSubmitting';
diff --git a/ui/helpers/utils/metric.test.js b/ui/helpers/utils/metric.test.js
deleted file mode 100644
index 5dbfb8ced832..000000000000
--- a/ui/helpers/utils/metric.test.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import {
- BlockaidReason,
- BlockaidResultType,
-} from '../../../shared/constants/security-provider';
-import { getBlockaidMetricsParams, getMethodName } from './metrics';
-
-describe('getMethodName', () => {
- it('should get correct method names', () => {
- expect(getMethodName(undefined)).toStrictEqual('');
- expect(getMethodName({})).toStrictEqual('');
- expect(getMethodName('confirm')).toStrictEqual('confirm');
- expect(getMethodName('balanceOf')).toStrictEqual('balance Of');
- expect(getMethodName('ethToTokenSwapInput')).toStrictEqual(
- 'eth To Token Swap Input',
- );
- });
-});
-
-describe('getBlockaidMetricsParams', () => {
- it('should return empty object when securityAlertResponse is not defined', () => {
- const result = getBlockaidMetricsParams(undefined);
- expect(result).toStrictEqual({});
- });
-
- it('should return additionalParams object when securityAlertResponse defined', () => {
- const securityAlertResponse = {
- result_type: BlockaidResultType.Malicious,
- reason: BlockaidReason.notApplicable,
- providerRequestsCount: {
- eth_call: 5,
- eth_getCode: 3,
- },
- features: [],
- };
-
- const result = getBlockaidMetricsParams(securityAlertResponse);
- expect(result).toStrictEqual({
- ui_customizations: ['flagged_as_malicious'],
- security_alert_response: BlockaidResultType.Malicious,
- security_alert_reason: BlockaidReason.notApplicable,
- ppom_eth_call_count: 5,
- ppom_eth_getCode_count: 3,
- });
- });
-
- it('should not return eth call counts if providerRequestsCount is empty', () => {
- const securityAlertResponse = {
- result_type: BlockaidResultType.Malicious,
- reason: BlockaidReason.notApplicable,
- features: [],
- providerRequestsCount: {},
- };
-
- const result = getBlockaidMetricsParams(securityAlertResponse);
- expect(result).toStrictEqual({
- ui_customizations: ['flagged_as_malicious'],
- security_alert_response: BlockaidResultType.Malicious,
- security_alert_reason: BlockaidReason.notApplicable,
- });
- });
-
- it('should not return eth call counts if providerRequestsCount is undefined', () => {
- const securityAlertResponse = {
- result_type: BlockaidResultType.Malicious,
- reason: BlockaidReason.notApplicable,
- features: [],
- providerRequestsCount: undefined,
- };
-
- const result = getBlockaidMetricsParams(securityAlertResponse);
- expect(result).toStrictEqual({
- ui_customizations: ['flagged_as_malicious'],
- security_alert_response: BlockaidResultType.Malicious,
- security_alert_reason: BlockaidReason.notApplicable,
- });
- });
-});
diff --git a/ui/helpers/utils/metrics.js b/ui/helpers/utils/metrics.js
index 4c8b2a2ae871..8902f1bed336 100644
--- a/ui/helpers/utils/metrics.js
+++ b/ui/helpers/utils/metrics.js
@@ -3,6 +3,7 @@ import {
BlockaidReason,
BlockaidResultType,
} from '../../../shared/constants/security-provider';
+import { MetaMetricsEventUiCustomization } from '../../../shared/constants/metametrics';
///: END:ONLY_INCLUDE_IF
export function getMethodName(camelCase) {
@@ -25,42 +26,61 @@ export function formatAccountType(accountType) {
}
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-export const getBlockaidMetricsParams = (securityAlertResponse = null) => {
- const additionalParams = {};
+/**
+ * Returns the ui_customization string value based on the result type
+ *
+ * @param {BlockaidResultType} resultType
+ * @returns {MetaMetricsEventUiCustomization}
+ */
+const getBlockaidMetricUiCustomization = (resultType) => {
+ let uiCustomization;
- if (securityAlertResponse) {
- const {
- result_type: resultType,
- reason,
- providerRequestsCount,
- } = securityAlertResponse;
+ if (resultType === BlockaidResultType.Failed) {
+ uiCustomization = [MetaMetricsEventUiCustomization.SecurityAlertFailed];
+ } else if (resultType === BlockaidResultType.Malicious) {
+ uiCustomization = [MetaMetricsEventUiCustomization.FlaggedAsMalicious];
+ } else if (resultType === BlockaidResultType.Warning) {
+ uiCustomization = [MetaMetricsEventUiCustomization.FlaggedAsWarning];
+ }
+
+ return uiCustomization;
+};
- if (resultType === BlockaidResultType.Malicious) {
- additionalParams.ui_customizations = ['flagged_as_malicious'];
- }
+/**
+ * @param {import('@metamask/transaction-controller').TransactionMeta} transactionMeta
+ * @returns {object}
+ */
+export const getBlockaidMetricsProps = ({ securityAlertResponse }) => {
+ if (!securityAlertResponse) {
+ return {};
+ }
- if (resultType === BlockaidResultType.Failed) {
- additionalParams.ui_customizations = ['security_alert_failed'];
- }
+ const params = {};
+ const {
+ providerRequestsCount,
+ reason,
+ result_type: resultType,
+ } = securityAlertResponse;
- if (resultType !== BlockaidResultType.Benign) {
- additionalParams.security_alert_reason = BlockaidReason.notApplicable;
+ const uiCustomization = getBlockaidMetricUiCustomization(resultType);
+ if (uiCustomization) {
+ params.ui_customizations = uiCustomization;
+ }
- if (reason) {
- additionalParams.security_alert_response = resultType;
- additionalParams.security_alert_reason = reason;
- }
- }
+ if (resultType !== BlockaidResultType.Benign) {
+ params.security_alert_reason = reason ?? BlockaidReason.notApplicable;
+ }
+ params.security_alert_response =
+ resultType ?? BlockaidResultType.NotApplicable;
- // add counts of each RPC call
- if (providerRequestsCount) {
- Object.keys(providerRequestsCount).forEach((key) => {
- const metricKey = `ppom_${key}_count`;
- additionalParams[metricKey] = providerRequestsCount[key];
- });
- }
+ // add counts of each RPC call
+ if (providerRequestsCount) {
+ Object.keys(providerRequestsCount).forEach((key) => {
+ const metricKey = `ppom_${key}_count`;
+ params[metricKey] = providerRequestsCount[key];
+ });
}
- return additionalParams;
+ return params;
};
///: END:ONLY_INCLUDE_IF
diff --git a/ui/helpers/utils/metrics.test.js b/ui/helpers/utils/metrics.test.js
new file mode 100644
index 000000000000..b75f5b7b2693
--- /dev/null
+++ b/ui/helpers/utils/metrics.test.js
@@ -0,0 +1,164 @@
+import {
+ BlockaidReason,
+ BlockaidResultType,
+} from '../../../shared/constants/security-provider';
+import { getBlockaidMetricsProps, getMethodName } from './metrics';
+
+describe('getMethodName', () => {
+ it('gets correct method names', () => {
+ expect(getMethodName(undefined)).toStrictEqual('');
+ expect(getMethodName({})).toStrictEqual('');
+ expect(getMethodName('confirm')).toStrictEqual('confirm');
+ expect(getMethodName('balanceOf')).toStrictEqual('balance Of');
+ expect(getMethodName('ethToTokenSwapInput')).toStrictEqual(
+ 'eth To Token Swap Input',
+ );
+ });
+});
+
+const securityAlertResponse = {
+ result_type: BlockaidResultType.Malicious,
+ reason: BlockaidReason.setApprovalForAll,
+ features: [],
+};
+
+describe('getBlockaidMetricsProps', () => {
+ it('returns an empty object when securityAlertResponse is not defined', () => {
+ const result = getBlockaidMetricsProps({});
+ expect(result).toStrictEqual({});
+ });
+
+ it('returns metric props when securityAlertResponse defined', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse,
+ });
+ expect(result).toStrictEqual({
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ security_alert_response: BlockaidResultType.Malicious,
+ ui_customizations: ['flagged_as_malicious'],
+ });
+ });
+
+ it('includes not applicable reason or result type when they are not provided', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ reason: null,
+ result_type: null,
+ },
+ });
+
+ expect(result.security_alert_reason).toBe(BlockaidReason.notApplicable);
+ expect(result.security_alert_response).toBe(
+ BlockaidResultType.NotApplicable,
+ );
+ });
+
+ it('includes "security_alert_failed" ui_customization when type is failed', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ result_type: BlockaidResultType.Failed,
+ },
+ });
+
+ expect(result).toStrictEqual({
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ security_alert_response: BlockaidResultType.Failed,
+ ui_customizations: ['security_alert_failed'],
+ });
+ });
+
+ it('includes "flagged_as_malicious" ui_customization when type is malicious', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ result_type: BlockaidResultType.Malicious,
+ },
+ });
+
+ expect(result).toStrictEqual({
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ security_alert_response: BlockaidResultType.Malicious,
+ ui_customizations: ['flagged_as_malicious'],
+ });
+ });
+
+ it('includes "flagged_as_warning" ui_customization when type is a warning', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ result_type: BlockaidResultType.Malicious,
+ },
+ });
+
+ expect(result).toStrictEqual({
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ security_alert_response: BlockaidResultType.Malicious,
+ ui_customizations: ['flagged_as_malicious'],
+ });
+ });
+
+ it('excludes reason when type is benign', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ result_type: BlockaidResultType.Benign,
+ },
+ });
+
+ expect(result).toStrictEqual({
+ security_alert_response: BlockaidResultType.Benign,
+ });
+ });
+
+ it('includes eth call counts when providerRequestsCount is provided', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ providerRequestsCount: {
+ eth_call: 5,
+ eth_getCode: 3,
+ },
+ },
+ });
+
+ expect(result).toStrictEqual({
+ ppom_eth_call_count: 5,
+ ppom_eth_getCode_count: 3,
+ ui_customizations: ['flagged_as_malicious'],
+ security_alert_response: BlockaidResultType.Malicious,
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ });
+ });
+
+ it('excludes eth call counts if providerRequestsCount is empty', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ providerRequestsCount: {},
+ },
+ });
+
+ expect(result).toStrictEqual({
+ ui_customizations: ['flagged_as_malicious'],
+ security_alert_response: BlockaidResultType.Malicious,
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ });
+ });
+
+ it('excludes eth call counts if providerRequestsCount is undefined', () => {
+ const result = getBlockaidMetricsProps({
+ securityAlertResponse: {
+ ...securityAlertResponse,
+ providerRequestsCount: undefined,
+ },
+ });
+
+ expect(result).toStrictEqual({
+ ui_customizations: ['flagged_as_malicious'],
+ security_alert_response: BlockaidResultType.Malicious,
+ security_alert_reason: BlockaidReason.setApprovalForAll,
+ });
+ });
+});
diff --git a/ui/helpers/utils/settings-search.js b/ui/helpers/utils/settings-search.js
index da81fd20d99b..97c78295975f 100644
--- a/ui/helpers/utils/settings-search.js
+++ b/ui/helpers/utils/settings-search.js
@@ -51,12 +51,12 @@ function colorText(menuElement, regex) {
let elemText = menuElement.innerHTML;
elemText = elemText.replace('&', '&');
elemText = elemText.replace(
- /(|<\/span>)/gim,
+ /(|<\/span>)/gim,
'',
);
menuElement.innerHTML = elemText.replace(
regex,
- '$& ',
+ '$& ',
);
}
}
diff --git a/ui/hooks/confirm/useConfirmationNetworkInfo.test.ts b/ui/hooks/confirm/useConfirmationNetworkInfo.test.ts
index 22b31d6f1748..2924483d2337 100644
--- a/ui/hooks/confirm/useConfirmationNetworkInfo.test.ts
+++ b/ui/hooks/confirm/useConfirmationNetworkInfo.test.ts
@@ -15,7 +15,7 @@ describe('useConfirmationNetworkInfo', () => {
);
expect(result.current.networkDisplayName).toBe('Ethereum Mainnet');
- expect(result.current.networkImageUrl).toBe('./images/eth_logo.png');
+ expect(result.current.networkImageUrl).toBe('./images/eth_logo.svg');
});
it('returns display name and image of provider chainId when confirmation chainId is not present', () => {
diff --git a/ui/hooks/useAccountTotalFiatBalance.test.js b/ui/hooks/useAccountTotalFiatBalance.test.js
index 70dd78211f7b..3c1e5a52bc01 100644
--- a/ui/hooks/useAccountTotalFiatBalance.test.js
+++ b/ui/hooks/useAccountTotalFiatBalance.test.js
@@ -131,7 +131,7 @@ describe('useAccountTotalFiatBalance', () => {
orderedTokenList: [
{
fiatBalance: '1.85',
- iconUrl: './images/eth_logo.png',
+ iconUrl: './images/eth_logo.svg',
symbol: 'ETH',
},
{
diff --git a/ui/hooks/useAddressDetails.js b/ui/hooks/useAddressDetails.js
index 63a1b58ec25e..96a7ed0f7e37 100644
--- a/ui/hooks/useAddressDetails.js
+++ b/ui/hooks/useAddressDetails.js
@@ -3,28 +3,32 @@ import { useSelector } from 'react-redux';
import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils';
import {
getAddressBook,
- getMetaMaskIdentities,
+ getInternalAccounts,
getTokenList,
} from '../selectors';
import { shortenAddress } from '../helpers/utils/util';
const useAddressDetails = (toAddress) => {
const addressBook = useSelector(getAddressBook);
- const identities = useSelector(getMetaMaskIdentities);
+ const accounts = useSelector(getInternalAccounts);
const tokenList = useSelector(getTokenList);
const checksummedAddress = toChecksumHexAddress(toAddress);
if (!toAddress) {
return {};
}
+ const toAccount = accounts.find(
+ (account) => toChecksumHexAddress(account.address) === checksummedAddress,
+ );
+
const addressBookEntryObject = addressBook.find(
(entry) => entry.address === checksummedAddress,
);
if (addressBookEntryObject?.name) {
return { toName: addressBookEntryObject.name, isTrusted: true };
}
- if (identities[toAddress]?.name) {
- return { toName: identities[toAddress].name, isTrusted: true };
+ if (toAccount) {
+ return { toName: toAccount.metadata.name, isTrusted: true };
}
if (tokenList[toAddress?.toLowerCase()]?.name) {
return {
diff --git a/ui/hooks/useAddressDetails.test.js b/ui/hooks/useAddressDetails.test.js
index a8c2cfa26047..4c723d318bba 100644
--- a/ui/hooks/useAddressDetails.test.js
+++ b/ui/hooks/useAddressDetails.test.js
@@ -1,6 +1,7 @@
import React from 'react';
import { Provider } from 'react-redux';
import { renderHook } from '@testing-library/react-hooks';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import configureStore from '../store/store';
import useAddressDetails from './useAddressDetails';
@@ -13,6 +14,24 @@ const renderUseAddressDetails = (toAddress, stateVariables = {}) => {
chainId: '0x5',
},
tokenList: {},
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
...stateVariables,
},
};
@@ -54,15 +73,27 @@ describe('useAddressDetails', () => {
expect(isTrusted).toBe(true);
});
- it('should return name from identities if address is present in identities', () => {
+ it('should return name from internal account if address is present in internalAccounts', () => {
const { result } = renderUseAddressDetails(
'0x06195827297c7A80a443b6894d3BDB8824b43896',
{
- identities: {
- '0x06195827297c7A80a443b6894d3BDB8824b43896': {
- address: '0x06195827297c7A80a443b6894d3BDB8824b43896',
- name: 'Account 1',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0x06195827297c7A80a443b6894d3BDB8824b43896',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
},
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
},
},
);
diff --git a/ui/hooks/useAssetDetails.test.js b/ui/hooks/useAssetDetails.test.js
index 074a3aec65c8..a62091ac228b 100644
--- a/ui/hooks/useAssetDetails.test.js
+++ b/ui/hooks/useAssetDetails.test.js
@@ -1,6 +1,7 @@
import React from 'react';
import { Provider } from 'react-redux';
import { renderHook } from '@testing-library/react-hooks';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import configureStore from '../store/store';
import * as Actions from '../store/actions';
@@ -20,6 +21,24 @@ const renderUseAssetDetails = ({
},
tokenList: {},
tokens: [],
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: userAddress,
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
},
};
diff --git a/ui/hooks/useDisplayName.test.ts b/ui/hooks/useDisplayName.test.ts
new file mode 100644
index 000000000000..a982ac8ccfd7
--- /dev/null
+++ b/ui/hooks/useDisplayName.test.ts
@@ -0,0 +1,70 @@
+import { NameEntry, NameType } from '@metamask/name-controller';
+import { getMemoizedMetadataContractName } from '../selectors';
+import { useDisplayName } from './useDisplayName';
+import { useName } from './useName';
+
+jest.mock('react-redux', () => ({
+ useSelector: (selector: any) => selector(),
+}));
+
+jest.mock('./useName', () => ({
+ useName: jest.fn(),
+}));
+
+jest.mock('../selectors', () => ({
+ getMemoizedMetadataContractName: jest.fn(),
+}));
+
+const VALUE_MOCK = '0xabc123';
+const TYPE_MOCK = NameType.ETHEREUM_ADDRESS;
+const NAME_MOCK = 'TestName';
+const CONTRACT_NAME_MOCK = 'TestContractName';
+
+const NO_CONTRACT_NAME_FOUND_RETURN_VALUE = null;
+const NO_PETNAME_FOUND_RETURN_VALUE = {
+ name: null,
+} as NameEntry;
+
+const PETNAME_FOUND_RETURN_VALUE = {
+ name: NAME_MOCK,
+} as NameEntry;
+
+describe('useDisplayName', () => {
+ const getMemoizedMetadataContractNameMock = jest.mocked(
+ getMemoizedMetadataContractName,
+ );
+ const useNameMock = jest.mocked(useName);
+
+ beforeEach(() => {
+ jest.resetAllMocks();
+ });
+
+ it('returns null if no name is found', () => {
+ useNameMock.mockReturnValue(NO_PETNAME_FOUND_RETURN_VALUE);
+ getMemoizedMetadataContractNameMock.mockReturnValue(
+ NO_CONTRACT_NAME_FOUND_RETURN_VALUE,
+ );
+
+ const name = useDisplayName(VALUE_MOCK, TYPE_MOCK);
+
+ expect(name).toBe(null);
+ });
+
+ it('returns a petname if one is found, even if a contract name exists', () => {
+ useNameMock.mockReturnValue(PETNAME_FOUND_RETURN_VALUE);
+ getMemoizedMetadataContractNameMock.mockReturnValue(CONTRACT_NAME_MOCK);
+
+ const name = useDisplayName(VALUE_MOCK, TYPE_MOCK);
+
+ expect(name).toBe(NAME_MOCK);
+ });
+
+ it('returns a contract name if one is found, if no petname exists', () => {
+ useNameMock.mockReturnValue(NO_PETNAME_FOUND_RETURN_VALUE);
+ getMemoizedMetadataContractNameMock.mockReturnValue(CONTRACT_NAME_MOCK);
+
+ const name = useDisplayName(VALUE_MOCK, TYPE_MOCK);
+
+ expect(name).toBe(CONTRACT_NAME_MOCK);
+ });
+});
diff --git a/ui/hooks/useDisplayName.ts b/ui/hooks/useDisplayName.ts
new file mode 100644
index 000000000000..8325e6902154
--- /dev/null
+++ b/ui/hooks/useDisplayName.ts
@@ -0,0 +1,30 @@
+import { NameType } from '@metamask/name-controller';
+import { useSelector } from 'react-redux';
+import { getMemoizedMetadataContractName } from '../selectors';
+import { useName } from './useName';
+
+/**
+ * Attempts to resolve the name for the given parameters.
+ *
+ * @param value
+ * @param type
+ * @param variation
+ * @returns The name if it can be resolved, otherwise null.
+ */
+export function useDisplayName(
+ value: string,
+ type: NameType,
+ variation?: string,
+): string | null {
+ const nameEntry = useName(value, type, variation);
+ const contractName = useSelector((state) =>
+ (getMemoizedMetadataContractName as any)(state, value),
+ );
+ if (nameEntry?.name) {
+ return nameEntry.name;
+ }
+ if (contractName) {
+ return contractName;
+ }
+ return null;
+}
diff --git a/ui/hooks/useName.test.ts b/ui/hooks/useName.test.ts
index d2def7b8223b..18d30f697119 100644
--- a/ui/hooks/useName.test.ts
+++ b/ui/hooks/useName.test.ts
@@ -1,4 +1,10 @@
-import { NameType } from '@metamask/name-controller';
+import {
+ FALLBACK_VARIATION,
+ NameControllerState,
+ NameEntry,
+ NameOrigin,
+ NameType,
+} from '@metamask/name-controller';
import { getCurrentChainId, getNames } from '../selectors';
import { useName } from './useName';
@@ -17,13 +23,19 @@ const VALUE_MOCK = '0xabc123';
const TYPE_MOCK = NameType.ETHEREUM_ADDRESS;
const NAME_MOCK = 'TestName';
const SOURCE_ID_MOCK = 'TestSourceId';
+const ORIGIN_MOCK = NameOrigin.API;
const PROPOSED_NAMES_MOCK = {
- [SOURCE_ID_MOCK]: ['TestProposedName', 'TestProposedName2'],
+ [SOURCE_ID_MOCK]: {
+ proposedNames: ['TestProposedName', 'TestProposedName2'],
+ lastRequestTime: null,
+ updateDelay: null,
+ },
};
describe('useName', () => {
const getCurrentChainIdMock = jest.mocked(getCurrentChainId);
- const getNamesMock = jest.mocked(getNames);
+ const getNamesMock =
+ jest.mocked<(state: any) => NameControllerState['names']>(getNames);
beforeEach(() => {
jest.resetAllMocks();
@@ -32,13 +44,14 @@ describe('useName', () => {
});
it('returns default values if no state', () => {
- getNamesMock.mockReturnValue({});
+ getNamesMock.mockReturnValue({} as NameControllerState['names']);
const nameEntry = useName(VALUE_MOCK, TYPE_MOCK);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: null,
sourceId: null,
+ origin: null,
proposedNames: {},
});
});
@@ -51,6 +64,7 @@ describe('useName', () => {
name: NAME_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
},
},
},
@@ -58,9 +72,10 @@ describe('useName', () => {
const nameEntry = useName(VALUE_MOCK, TYPE_MOCK);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: null,
sourceId: null,
+ origin: null,
proposedNames: {},
});
});
@@ -73,6 +88,7 @@ describe('useName', () => {
name: NAME_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
},
},
},
@@ -80,10 +96,11 @@ describe('useName', () => {
const nameEntry = useName(VALUE_MOCK, TYPE_MOCK);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: NAME_MOCK,
sourceId: SOURCE_ID_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
+ origin: ORIGIN_MOCK,
});
});
@@ -95,6 +112,7 @@ describe('useName', () => {
name: NAME_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
},
},
},
@@ -102,10 +120,67 @@ describe('useName', () => {
const nameEntry = useName(VALUE_MOCK, TYPE_MOCK, CHAIN_ID_2_MOCK);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: NAME_MOCK,
sourceId: SOURCE_ID_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
+ origin: ORIGIN_MOCK,
+ });
+ });
+
+ describe('fallback variation', () => {
+ it('is used if specified variation has no entry.', () => {
+ getNamesMock.mockReturnValue({
+ [TYPE_MOCK]: {
+ [VALUE_MOCK]: {
+ [FALLBACK_VARIATION]: {
+ name: NAME_MOCK,
+ proposedNames: PROPOSED_NAMES_MOCK,
+ sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
+ },
+ },
+ },
+ });
+
+ const nameEntry = useName(VALUE_MOCK, TYPE_MOCK, CHAIN_ID_2_MOCK);
+
+ expect(nameEntry).toStrictEqual({
+ name: NAME_MOCK,
+ sourceId: SOURCE_ID_MOCK,
+ proposedNames: PROPOSED_NAMES_MOCK,
+ origin: ORIGIN_MOCK,
+ });
+ });
+
+ it('is used if specified variation has entry with cleared name', () => {
+ getNamesMock.mockReturnValue({
+ [TYPE_MOCK]: {
+ [VALUE_MOCK]: {
+ [CHAIN_ID_2_MOCK]: {
+ name: null,
+ proposedNames: PROPOSED_NAMES_MOCK,
+ sourceId: null,
+ origin: null,
+ },
+ [FALLBACK_VARIATION]: {
+ name: NAME_MOCK,
+ proposedNames: {},
+ sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
+ },
+ },
+ },
+ });
+
+ const nameEntry = useName(VALUE_MOCK, TYPE_MOCK, CHAIN_ID_2_MOCK);
+
+ expect(nameEntry).toStrictEqual({
+ name: NAME_MOCK,
+ proposedNames: {},
+ sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
+ });
});
});
@@ -119,6 +194,7 @@ describe('useName', () => {
name: NAME_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
},
},
},
@@ -126,10 +202,11 @@ describe('useName', () => {
const nameEntry = useName(VALUE_MOCK, alternateType);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: NAME_MOCK,
sourceId: SOURCE_ID_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
+ origin: ORIGIN_MOCK,
});
});
@@ -141,6 +218,7 @@ describe('useName', () => {
name: NAME_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
sourceId: SOURCE_ID_MOCK,
+ origin: ORIGIN_MOCK,
},
},
},
@@ -148,10 +226,11 @@ describe('useName', () => {
const nameEntry = useName('0xAbC123', TYPE_MOCK);
- expect(nameEntry).toStrictEqual({
+ expect(nameEntry).toStrictEqual({
name: NAME_MOCK,
sourceId: SOURCE_ID_MOCK,
proposedNames: PROPOSED_NAMES_MOCK,
+ origin: ORIGIN_MOCK,
});
});
});
diff --git a/ui/hooks/useName.ts b/ui/hooks/useName.ts
index ed155bdc82a6..3c02cd25f4be 100644
--- a/ui/hooks/useName.ts
+++ b/ui/hooks/useName.ts
@@ -1,4 +1,8 @@
-import { NameEntry, NameType } from '@metamask/name-controller';
+import {
+ FALLBACK_VARIATION,
+ NameEntry,
+ NameType,
+} from '@metamask/name-controller';
import { useSelector } from 'react-redux';
import { isEqual } from 'lodash';
import { getCurrentChainId, getNames } from '../selectors';
@@ -33,11 +37,26 @@ export function useName(
const normalizedValue = normalizeValue(value, type);
const typeVariationKey = getVariationKey(type, chainId);
const variationKey = variation ?? typeVariationKey;
- const nameEntry = names[type]?.[normalizedValue]?.[variationKey];
+ const variationsToNameEntries = names[type]?.[normalizedValue] ?? {};
+ const variationEntry = variationsToNameEntries[variationKey];
+ const fallbackEntry = variationsToNameEntries[FALLBACK_VARIATION];
+
+ const entry =
+ !variationEntry?.name && fallbackEntry
+ ? fallbackEntry
+ : variationEntry ?? {};
+
+ const {
+ name = null,
+ sourceId = null,
+ origin = null,
+ proposedNames = {},
+ } = entry;
return {
- name: nameEntry?.name ?? null,
- sourceId: nameEntry?.sourceId ?? null,
- proposedNames: nameEntry?.proposedNames ?? {},
+ name,
+ sourceId,
+ proposedNames,
+ origin,
};
}
diff --git a/ui/hooks/useNftsCollections.js b/ui/hooks/useNftsCollections.js
index f0b4ebdbd5f3..cfb3958da6b3 100644
--- a/ui/hooks/useNftsCollections.js
+++ b/ui/hooks/useNftsCollections.js
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { isEqual } from 'lodash';
import { getNfts, getNftContracts } from '../ducks/metamask/metamask';
-import { getCurrentChainId, getSelectedAddress } from '../selectors';
+import { getCurrentChainId, getSelectedInternalAccount } from '../selectors';
import { usePrevious } from './usePrevious';
import { useI18nContext } from './useI18nContext';
@@ -18,7 +18,7 @@ export function useNftsCollections() {
});
const nfts = useSelector(getNfts);
const [nftsLoading, setNftsLoading] = useState(() => nfts?.length >= 0);
- const selectedAddress = useSelector(getSelectedAddress);
+ const { address: selectedAddress } = useSelector(getSelectedInternalAccount);
const chainId = useSelector(getCurrentChainId);
const nftContracts = useSelector(getNftContracts);
const prevNfts = usePrevious(nfts);
diff --git a/ui/hooks/usePetnamesEnabled.test.ts b/ui/hooks/usePetnamesEnabled.test.ts
new file mode 100644
index 000000000000..4f742a539e3c
--- /dev/null
+++ b/ui/hooks/usePetnamesEnabled.test.ts
@@ -0,0 +1,45 @@
+import { renderHookWithProvider } from '../../test/lib/render-helpers';
+import { usePetnamesEnabled } from './usePetnamesEnabled';
+
+jest.unmock('../../ui/hooks/usePetnamesEnabled');
+
+type Test = {
+ petnamesEnabled: boolean | undefined;
+ expectedResult: boolean;
+};
+
+function createMockStateWithPetnamesEnabled(
+ petnamesEnabled: Test['petnamesEnabled'],
+) {
+ return { metamask: { preferences: { petnamesEnabled } } };
+}
+
+describe('usePetnamesEnabled', () => {
+ const tests: Test[] = [
+ {
+ petnamesEnabled: true,
+ expectedResult: true,
+ },
+ {
+ petnamesEnabled: false,
+ expectedResult: false,
+ },
+ {
+ // Petnames is enabled by default.
+ petnamesEnabled: undefined,
+ expectedResult: true,
+ },
+ ];
+
+ tests.forEach(({ petnamesEnabled, expectedResult }) => {
+ it(`should return ${String(
+ expectedResult,
+ )} when petnames preference is ${String(petnamesEnabled)}`, () => {
+ const { result } = renderHookWithProvider(
+ () => usePetnamesEnabled(),
+ createMockStateWithPetnamesEnabled(petnamesEnabled),
+ );
+ expect(result.current).toBe(expectedResult);
+ });
+ });
+});
diff --git a/ui/hooks/usePetnamesEnabled.ts b/ui/hooks/usePetnamesEnabled.ts
index 5f8629e19b68..5e168f135960 100644
--- a/ui/hooks/usePetnamesEnabled.ts
+++ b/ui/hooks/usePetnamesEnabled.ts
@@ -1,9 +1,6 @@
-export function usePetnamesEnabled(): boolean {
- let enabled = false;
-
- ///: BEGIN:ONLY_INCLUDE_IF(petnames)
- enabled = true;
- ///: END:ONLY_INCLUDE_IF
+import { useStore } from 'react-redux';
+import { getPetnamesEnabled } from '../selectors';
- return enabled;
+export function usePetnamesEnabled(): boolean {
+ return getPetnamesEnabled(useStore().getState());
}
diff --git a/ui/hooks/useTokenTracker.js b/ui/hooks/useTokenTracker.js
index 8af18f464be9..93b8fa08214e 100644
--- a/ui/hooks/useTokenTracker.js
+++ b/ui/hooks/useTokenTracker.js
@@ -1,7 +1,7 @@
import { useState, useEffect, useRef, useCallback } from 'react';
import TokenTracker from '@metamask/eth-token-tracker';
import { shallowEqual, useSelector } from 'react-redux';
-import { getCurrentChainId, getSelectedAddress } from '../selectors';
+import { getCurrentChainId, getSelectedInternalAccount } from '../selectors';
import { SECOND } from '../../shared/constants/time';
import { isEqualCaseInsensitive } from '../../shared/modules/string-utils';
import { useEqualityCheck } from './useEqualityCheck';
@@ -13,8 +13,11 @@ export function useTokenTracker({
hideZeroBalanceTokens = false,
}) {
const chainId = useSelector(getCurrentChainId);
+ const { address: selectedAddress } = useSelector(
+ getSelectedInternalAccount,
+ shallowEqual,
+ );
- const selectedAddress = useSelector(getSelectedAddress, shallowEqual);
const userAddress = address ?? selectedAddress;
const [loading, setLoading] = useState(() => tokens?.length >= 0);
diff --git a/ui/hooks/useTransactionEventFragment.js b/ui/hooks/useTransactionEventFragment.js
index f304e5ebdeec..ea3a70cf5750 100644
--- a/ui/hooks/useTransactionEventFragment.js
+++ b/ui/hooks/useTransactionEventFragment.js
@@ -18,14 +18,16 @@ export const useTransactionEventFragment = () => {
);
const updateTransactionEventFragment = useCallback(
- async (params) => {
- if (!transaction || !transaction.id) {
+ async (params, _transactionId) => {
+ const transactionId = _transactionId || transaction?.id;
+
+ if (!transactionId) {
return;
}
if (!fragment) {
- await createTransactionEventFragment(transaction.id);
+ await createTransactionEventFragment(transactionId);
}
- updateEventFragment(`transaction-added-${transaction.id}`, params);
+ updateEventFragment(`transaction-added-${transactionId}`, params);
},
[fragment, transaction],
);
diff --git a/ui/index.js b/ui/index.js
index b27d608cb326..b58f05380571 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -17,7 +17,7 @@ import * as actions from './store/actions';
import configureStore from './store/store';
import {
getPermittedAccountsForCurrentTab,
- getSelectedAddress,
+ getSelectedInternalAccount,
getUnapprovedTransactions,
} from './selectors';
import { ALERT_STATE } from './ducks/alerts';
@@ -131,7 +131,8 @@ async function startApp(metamaskState, backgroundConnection, opts) {
const { origin } = draftInitialState.activeTab;
const permittedAccountsForCurrentTab =
getPermittedAccountsForCurrentTab(draftInitialState);
- const selectedAddress = getSelectedAddress(draftInitialState);
+ const selectedAddress =
+ getSelectedInternalAccount(draftInitialState)?.address ?? '';
const unconnectedAccountAlertShownOrigins =
getUnconnectedAccountAlertShown(draftInitialState);
const unconnectedAccountAlertIsEnabled =
@@ -164,6 +165,7 @@ async function startApp(metamaskState, backgroundConnection, opts) {
metamaskState.unapprovedDecryptMsgs,
metamaskState.unapprovedEncryptionPublicKeyMsgs,
metamaskState.unapprovedTypedMessages,
+ metamaskState.networkId,
metamaskState.providerConfig.chainId,
);
const numberOfUnapprovedTx = unapprovedTxsAll.length;
diff --git a/ui/pages/confirm-add-suggested-nft/__snapshots__/confirm-add-suggested-nft.test.js.snap b/ui/pages/confirm-add-suggested-nft/__snapshots__/confirm-add-suggested-nft.test.js.snap
index e807bd5915fc..0f3f3df13c45 100644
--- a/ui/pages/confirm-add-suggested-nft/__snapshots__/confirm-add-suggested-nft.test.js.snap
+++ b/ui/pages/confirm-add-suggested-nft/__snapshots__/confirm-add-suggested-nft.test.js.snap
@@ -72,7 +72,7 @@ exports[`ConfirmAddSuggestedNFT Component should match snapshot 1`] = `
>
@@ -185,7 +185,7 @@ exports[`ConfirmAddSuggestedNFT Component should match snapshot 1`] = `
CryptoKitty
#
15
@@ -282,7 +282,7 @@ exports[`ConfirmAddSuggestedNFT Component should match snapshot 1`] = `
>
@@ -395,7 +395,7 @@ exports[`ConfirmAddSuggestedNFT Component should match snapshot 1`] = `
CryptoKitty
#
15
diff --git a/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js b/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js
index 2d74cac235f1..14b28d0f6ef8 100644
--- a/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js
+++ b/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js
@@ -50,6 +50,7 @@ import {
TextAlign,
TextVariant,
BlockSize,
+ TextColor,
} from '../../helpers/constants/design-system';
import NetworkAccountBalanceHeader from '../../components/app/network-account-balance-header/network-account-balance-header';
import { NETWORK_TO_NAME_MAP } from '../../../shared/constants/network';
@@ -294,6 +295,7 @@ const ConfirmAddSuggestedNFT = () => {
)}
#{tokenId}
@@ -359,6 +361,7 @@ const ConfirmAddSuggestedNFT = () => {
)}
#{tokenId}
diff --git a/ui/pages/confirm-add-suggested-nft/index.scss b/ui/pages/confirm-add-suggested-nft/index.scss
index 494a4c792edd..a847098e2444 100644
--- a/ui/pages/confirm-add-suggested-nft/index.scss
+++ b/ui/pages/confirm-add-suggested-nft/index.scss
@@ -56,8 +56,6 @@
&__nft-tokenid {
@include H7;
-
- color: #606060;
}
&__nft-remove-tooltip {
diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
index 8db0c3665862..0e0e37cb8898 100644
--- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
+++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
@@ -21,10 +21,6 @@ import { ConfirmPageContainerWarning } from '../../../components/app/confirm-pag
import LedgerInstructionField from '../../../components/app/ledger-instruction-field';
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
import BlockaidBannerAlert from '../../../components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert';
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
-} from '../../../../shared/constants/metametrics';
///: END:ONLY_INCLUDE_IF
import { isSuspiciousResponse } from '../../../../shared/modules/security-provider.utils';
@@ -545,20 +541,6 @@ export default class ConfirmApproveContent extends Component {
} = this.props;
const { showFullTxDetails, setShowContractDetails } = this.state;
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- const onClickSupportLink = () => {
- this.context.trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Confirm Approve',
- origin: txData?.origin,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- };
- ///: END:ONLY_INCLUDE_IF
-
return (
{
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-
+
///: END:ONLY_INCLUDE_IF
}
{isSuspiciousResponse(txData?.securityProviderResponse) && (
diff --git a/ui/pages/confirm-signature-request/index.test.js b/ui/pages/confirm-signature-request/index.test.js
index e7db0dece355..be7fc0a52bfa 100644
--- a/ui/pages/confirm-signature-request/index.test.js
+++ b/ui/pages/confirm-signature-request/index.test.js
@@ -64,7 +64,6 @@ const mockState = {
balance: '0x7e64033f2fdb0436',
},
},
- selectedAddress: '0x8eeee1781fd885ff5ddef7789486676961873d12',
addressBook: {},
tokenList: {},
preferences: {},
diff --git a/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.js
index c4e47fd12ddd..e1723cb7c2f4 100644
--- a/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.js
+++ b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.js
@@ -18,7 +18,7 @@ import {
getCurrentChainId,
getCurrentCurrency,
getRpcPrefsForCurrentProvider,
- getSelectedAddress,
+ getSelectedInternalAccount,
} from '../../selectors';
import {
getConversionRate,
@@ -54,7 +54,7 @@ export default function ConfirmTokenTransactionBase({
const conversionRate = useSelector(getConversionRate);
const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider);
const chainId = useSelector(getCurrentChainId);
- const userAddress = useSelector(getSelectedAddress);
+ const { address: userAddress } = useSelector(getSelectedInternalAccount);
const nftCollections = useSelector(getNftContracts);
const ethTransactionTotalMaxAmount = Number(
diff --git a/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap b/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap
index a1385843c529..2f64281591fc 100644
--- a/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap
+++ b/ui/pages/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap
@@ -140,7 +140,9 @@ exports[`Confirm Transaction Base should match snapshot 1`] = `
>
+ >
+ Account 1
+
diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js
index 27ad6263e486..3a300b37f2e6 100644
--- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js
+++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js
@@ -12,6 +12,7 @@ import {
GAS_LIMIT_TOO_LOW_ERROR_KEY,
ETH_GAS_PRICE_FETCH_WARNING_KEY,
GAS_PRICE_FETCH_FAILURE_ERROR_KEY,
+ IS_SIGNING_OR_SUBMITTING,
} from '../../helpers/constants/error-keys';
import UserPreferencedCurrencyDisplay from '../../components/app/user-preferenced-currency-display';
@@ -153,6 +154,7 @@ export default class ConfirmTransactionBase extends Component {
tokenSymbol: PropTypes.string,
updateTransaction: PropTypes.func,
isUsingPaymaster: PropTypes.bool,
+ isSigningOrSubmitting: PropTypes.bool,
};
state = {
@@ -243,6 +245,7 @@ export default class ConfirmTransactionBase extends Component {
customGas,
noGasPrice,
gasFeeIsCustom,
+ isSigningOrSubmitting,
} = this.props;
const insufficientBalance =
@@ -275,6 +278,13 @@ export default class ConfirmTransactionBase extends Component {
};
}
+ if (isSigningOrSubmitting) {
+ return {
+ valid: false,
+ errorKey: IS_SIGNING_OR_SUBMITTING,
+ };
+ }
+
return {
valid: true,
};
@@ -958,6 +968,7 @@ export default class ConfirmTransactionBase extends Component {
assetStandard,
displayAccountBalanceHeader,
title,
+ isSigningOrSubmitting,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
isNoteToTraderSupported,
///: END:ONLY_INCLUDE_IF
@@ -1051,7 +1062,8 @@ export default class ConfirmTransactionBase extends Component {
!valid ||
submitting ||
hardwareWalletRequiresConnection ||
- (gasIsLoading && !gasFeeIsCustom)
+ (gasIsLoading && !gasFeeIsCustom) ||
+ isSigningOrSubmitting
}
onEdit={() => this.handleEdit()}
onCancelAll={() => this.handleCancelAll()}
diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js
index b13346bdfc15..8f2400ffd519 100644
--- a/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js
+++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js
@@ -49,6 +49,8 @@ import {
getFullTxData,
getUseCurrencyRateCheck,
getUnapprovedTransactions,
+ getInternalAccountByAddress,
+ getApprovedAndSignedTransactions,
} from '../../selectors';
import { getMostRecentOverviewPage } from '../../ducks/history/history';
import {
@@ -135,7 +137,7 @@ const mapStateToProps = (state, ownProps) => {
const isBuyableChain = getIsBuyableChain(state);
const { confirmTransaction, metamask } = state;
const conversionRate = getConversionRate(state);
- const { identities, addressBook, nextNonce } = metamask;
+ const { addressBook, nextNonce } = metamask;
const unapprovedTxs = getUnapprovedTransactions(state);
const { chainId } = getProviderConfig(state);
const { tokenData, txData, tokenProps, nonce } = confirmTransaction;
@@ -156,7 +158,8 @@ const mapStateToProps = (state, ownProps) => {
const tokenToAddress = getTokenAddressParam(transactionData);
const { balance } = accounts[fromAddress];
- const { name: fromName } = identities[fromAddress];
+ const fromName = getInternalAccountByAddress(state, fromAddress)?.metadata
+ .name;
const keyring = findKeyringForAddress(state, fromAddress);
const isSendingAmount =
@@ -171,7 +174,7 @@ const mapStateToProps = (state, ownProps) => {
const tokenList = getTokenList(state);
const toName =
- identities[toAddress]?.name ||
+ getInternalAccountByAddress(state, toAddress)?.metadata.name ||
tokenList[toAddress?.toLowerCase()]?.name ||
shortenAddress(toChecksumHexAddress(toAddress));
@@ -245,6 +248,10 @@ const mapStateToProps = (state, ownProps) => {
const isMultiLayerFeeNetwork = getIsMultiLayerFeeNetwork(state);
const isUsingPaymaster = getIsUsingPaymaster(state);
+ const isSigningOrSubmitting = Boolean(
+ getApprovedAndSignedTransactions(state).length,
+ );
+
return {
balance,
fromAddress,
@@ -297,6 +304,7 @@ const mapStateToProps = (state, ownProps) => {
useCurrencyRateCheck: getUseCurrencyRateCheck(state),
keyringForAccount: keyring,
isUsingPaymaster,
+ isSigningOrSubmitting,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
accountType,
isNoteToTraderSupported,
diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.test.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.test.js
index fe8d2b94b870..8d6b9a484c7b 100644
--- a/ui/pages/confirm-transaction-base/confirm-transaction-base.test.js
+++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.test.js
@@ -23,6 +23,10 @@ import {
} from '../../../shared/constants/network';
import { domainInitialState } from '../../ducks/domains';
+import {
+ BlockaidReason,
+ BlockaidResultType,
+} from '../../../shared/constants/security-provider';
import ConfirmTransactionBase from './confirm-transaction-base.container';
const middleware = [thunk];
@@ -38,6 +42,7 @@ setBackgroundConnection({
const mockTxParamsFromAddress = '0x123456789';
const mockTxParamsToAddress = '0x85c1685cfceaa5c0bdb1609fc536e9a8387dd65e';
+const mockMaliciousToAddress = '0x5FbDB2315678afecb367f032d93F642f64180aa3';
const mockTxParamsToAddressConcat = '0x85c16...DD65e';
const mockParsedTxDataToAddressWithout0x =
@@ -239,6 +244,43 @@ describe('Confirm Transaction Base', () => {
expect(queryByText('Estimated fee')).not.toBeInTheDocument();
});
+ it('renders blockaid security alert if recipient is a malicious address', () => {
+ const newMockedStore = {
+ ...mockedStore,
+ send: {
+ ...mockedStore.send,
+ hasSimulationError: false,
+ },
+ confirmTransaction: {
+ ...mockedStore.confirmTransaction,
+ txData: {
+ ...mockedStore.confirmTransaction.txData,
+ txParams: {
+ ...mockedStore.confirmTransaction.txData.txParams,
+ to: mockMaliciousToAddress,
+ },
+ securityAlertResponse: {
+ reason: BlockaidReason.maliciousDomain,
+ result_type: BlockaidResultType.Malicious,
+ features: [],
+ },
+ },
+ },
+ };
+
+ const store = configureMockStore(middleware)(newMockedStore);
+
+ const { getByTestId } = renderWithProvider(
+
,
+ store,
+ );
+
+ const securityProviderBanner = getByTestId(
+ 'security-provider-banner-alert',
+ );
+ expect(securityProviderBanner).toBeInTheDocument();
+ });
+
it('should contain L1 L2 fee details for optimism', () => {
mockedStore.metamask.providerConfig.chainId = CHAIN_IDS.OPTIMISM;
mockedStore.confirmTransaction.txData.chainId = CHAIN_IDS.OPTIMISM;
diff --git a/ui/pages/confirmation/stories/switch-ethereum-chain.stories.js b/ui/pages/confirmation/stories/switch-ethereum-chain.stories.js
index 9b4ab2193129..22aaca937d3b 100644
--- a/ui/pages/confirmation/stories/switch-ethereum-chain.stories.js
+++ b/ui/pages/confirmation/stories/switch-ethereum-chain.stories.js
@@ -51,7 +51,7 @@ export default {
args: {
fromNetworkConfigurationNickname: 'Test Network 1',
fromNetworkConfigurationChainId: '0x123',
- fromNetworkConfigurationIconURL: './images/eth_logo.png',
+ fromNetworkConfigurationIconURL: './images/eth_logo.svg',
toNetworkConfigurationNickname: 'Test Network 2',
toNetworkConfigurationChainId: '0x456',
toNetworkConfigurationIconURL: './images/bnb.png',
diff --git a/ui/pages/connected-accounts/connected-accounts.component.js b/ui/pages/connected-accounts/connected-accounts.component.js
index eb3b5d107c20..de4a9dd3d6d2 100644
--- a/ui/pages/connected-accounts/connected-accounts.component.js
+++ b/ui/pages/connected-accounts/connected-accounts.component.js
@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
+import { useSelector } from 'react-redux';
import { WALLET_SNAP_PERMISSION_KEY } from '@metamask/snaps-utils';
import Popover from '../../components/ui/popover';
import ConnectedAccountsList from '../../components/app/connected-accounts-list';
@@ -9,6 +10,7 @@ import { useI18nContext } from '../../hooks/useI18nContext';
import ConnectedSnaps from '../../components/app/connected-sites-list/connected-snaps';
import { TextColor, TextVariant } from '../../helpers/constants/design-system';
import { Box, Text } from '../../components/component-library';
+import { getInternalAccounts } from '../../selectors';
export default function ConnectedAccounts({
accountToConnect = null,
@@ -21,12 +23,13 @@ export default function ConnectedAccounts({
permissions = undefined,
selectedAddress,
removePermittedAccount,
- setSelectedAddress,
+ setSelectedAccount,
subjectMetadata,
originOfActiveTab,
permissionSubjects,
}) {
const t = useI18nContext();
+ const internalAccounts = useSelector(getInternalAccounts);
const connectedSubjectsMetadata = subjectMetadata[originOfActiveTab];
const subjectHasSnaps =
permissionSubjects[originOfActiveTab]?.origin ===
@@ -99,7 +102,12 @@ export default function ConnectedAccounts({
connectedAccounts={connectedAccounts}
selectedAddress={selectedAddress}
removePermittedAccount={removePermittedAccount}
- setSelectedAddress={setSelectedAddress}
+ setSelectedAddress={(address) => {
+ const { id: accountId } = internalAccounts.find(
+ (internalAccount) => internalAccount.address === address,
+ );
+ setSelectedAccount(accountId);
+ }}
shouldRenderListOptions
/>
@@ -130,7 +138,7 @@ ConnectedAccounts.propTypes = {
isActiveTabExtension: PropTypes.bool.isRequired,
selectedAddress: PropTypes.string.isRequired,
removePermittedAccount: PropTypes.func.isRequired,
- setSelectedAddress: PropTypes.func.isRequired,
+ setSelectedAccount: PropTypes.func.isRequired,
history: PropTypes.object.isRequired,
subjectMetadata: PropTypes.arrayOf(PropTypes.object).isRequired,
originOfActiveTab: PropTypes.string,
diff --git a/ui/pages/connected-accounts/connected-accounts.container.js b/ui/pages/connected-accounts/connected-accounts.container.js
index ed10454d9d88..8530ca0f1c4a 100644
--- a/ui/pages/connected-accounts/connected-accounts.container.js
+++ b/ui/pages/connected-accounts/connected-accounts.container.js
@@ -4,8 +4,8 @@ import {
getOrderedConnectedAccountsForActiveTab,
getOriginOfCurrentTab,
getPermissionsForActiveTab,
+ getSelectedInternalAccount,
getPermissionSubjects,
- getSelectedAddress,
getSubjectMetadata,
getInternalAccounts,
} from '../../selectors';
@@ -13,7 +13,7 @@ import { isExtensionUrl } from '../../helpers/utils/util';
import {
addPermittedAccount,
removePermittedAccount,
- setSelectedAddress,
+ setSelectedInternalAccount,
} from '../../store/actions';
import { getMostRecentOverviewPage } from '../../ducks/history/history';
import ConnectedAccounts from './connected-accounts.component';
@@ -40,7 +40,7 @@ const mapStateToProps = (state) => {
)?.metadata.name,
};
const permissions = getPermissionsForActiveTab(state);
- const selectedAddress = getSelectedAddress(state);
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
const subjectMetadata = getSubjectMetadata(state);
const originOfActiveTab = getOriginOfCurrentTab(state);
const permissionSubjects = getPermissionSubjects(state);
@@ -66,7 +66,8 @@ const mapDispatchToProps = (dispatch) => {
dispatch(addPermittedAccount(origin, address)),
removePermittedAccount: (origin, address) =>
dispatch(removePermittedAccount(origin, address)),
- setSelectedAddress: (address) => dispatch(setSelectedAddress(address)),
+ setSelectedAccount: (accountId) =>
+ dispatch(setSelectedInternalAccount(accountId)),
};
};
diff --git a/ui/pages/connected-accounts/connected-accounts.stories.js b/ui/pages/connected-accounts/connected-accounts.stories.js
index 49e297194a24..eb42c31afd5e 100644
--- a/ui/pages/connected-accounts/connected-accounts.stories.js
+++ b/ui/pages/connected-accounts/connected-accounts.stories.js
@@ -60,16 +60,33 @@ const account = [
address: '0x983211ce699ea5ab57cc528086154b6db1ad8e55',
},
];
-const identities = {
- name: 'Account 1',
+const internalAccount = {
address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [
+ 'personal_sign',
+ 'eth_sign',
+ 'eth_signTransaction',
+ 'eth_signTypedData_v1',
+ 'eth_signTypedData_v3',
+ 'eth_signTypedData_v4',
+ ],
+ type: 'eip155:eoa',
};
+
export const DefaultStory = () => {
return (
{
const connectedSubjects = getConnectedSubjectsForSelectedAddress(state);
const originOfCurrentTab = getOriginOfCurrentTab(state);
const permittedAccountsByOrigin = getPermittedAccountsByOrigin(state);
- const selectedAddress = getSelectedAddress(state);
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
const currentTabHasNoAccounts =
!permittedAccountsByOrigin[originOfCurrentTab]?.length;
@@ -36,7 +35,7 @@ const mapStateToProps = (state) => {
}
return {
- accountLabel: getCurrentAccountWithSendEtherInfo(state).name,
+ accountLabel: getSelectedInternalAccount(state).metadata.name,
connectedSubjects,
subjects: getPermissionSubjects(state),
mostRecentOverviewPage: getMostRecentOverviewPage(state),
diff --git a/ui/pages/create-account/connect-hardware/index.test.tsx b/ui/pages/create-account/connect-hardware/index.test.tsx
index b7503f9f2a44..ea66fd6b8319 100644
--- a/ui/pages/create-account/connect-hardware/index.test.tsx
+++ b/ui/pages/create-account/connect-hardware/index.test.tsx
@@ -189,6 +189,7 @@ describe('ConnectHardwareForm', () => {
expect(getByText('AirGap Vault')).toBeInTheDocument();
expect(getByText('CoolWallet')).toBeInTheDocument();
expect(getByText("D'Cent")).toBeInTheDocument();
+ expect(getByText('imToken')).toBeInTheDocument();
});
});
});
diff --git a/ui/pages/create-account/connect-hardware/select-hardware.js b/ui/pages/create-account/connect-hardware/select-hardware.js
index ed979c4c9f84..2a9e89868b57 100644
--- a/ui/pages/create-account/connect-hardware/select-hardware.js
+++ b/ui/pages/create-account/connect-hardware/select-hardware.js
@@ -682,6 +682,41 @@ export default class SelectHardware extends Component {
>
),
},
+ {
+ message: (
+ <>
+
+ {this.context.t('imToken')}
+
+ {
+ this.context.trackEvent({
+ category: MetaMetricsEventCategory.Navigation,
+ event: 'Clicked imToken Learn More',
+ });
+ openWindow(HardwareAffiliateLinks.imtoken);
+ }}
+ >
+ {this.context.t('downloadNow')}
+
+ {
+ this.context.trackEvent({
+ category: MetaMetricsEventCategory.Navigation,
+ event: 'Clicked imToken Tutorial',
+ });
+ openWindow(HardwareAffiliateTutorialLinks.imtoken);
+ }}
+ >
+ {this.context.t('tutorial')}
+
+ >
+ ),
+ },
{
message: this.context.t('QRHardwareWalletSteps2Description'),
},
diff --git a/ui/pages/home/home.component.js b/ui/pages/home/home.component.js
index 330e932244e0..3743ba306cfa 100644
--- a/ui/pages/home/home.component.js
+++ b/ui/pages/home/home.component.js
@@ -837,23 +837,21 @@ export default class Home extends PureComponent {
///: END:ONLY_INCLUDE_IF
}
- {process.env.MULTICHAIN ? null : (
-
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
-
- ///: END:ONLY_INCLUDE_IF
- }
- {
- ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
-
- ///: END:ONLY_INCLUDE_IF
- }
-
- )}
+
+ {
+ ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
+
+ ///: END:ONLY_INCLUDE_IF
+ }
+ {
+ ///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
+
+ ///: END:ONLY_INCLUDE_IF
+ }
+
{
...getSnapInstallOrUpdateRequests(state),
];
///: END:ONLY_INCLUDE_IF
- const currentAddress = getSelectedAddress(state);
+ const { address: currentAddress } = getSelectedInternalAccount(state);
const permissionsRequest = permissionsRequests.find(
(req) => req.metadata.id === permissionsRequestId,
diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js
index c1cafed52ede..a5df0ccb29b3 100644
--- a/ui/pages/routes/routes.component.js
+++ b/ui/pages/routes/routes.component.js
@@ -34,8 +34,6 @@ import {
AccountDetails,
ImportNftsModal,
ImportTokensModal,
- SelectActionModal,
- AppFooter,
} from '../../components/multichain';
import UnlockPage from '../unlock-page';
import Alerts from '../../components/app/alerts';
@@ -172,8 +170,6 @@ export default class Routes extends Component {
hideIpfsModal: PropTypes.func.isRequired,
isImportTokensModalOpen: PropTypes.bool.isRequired,
hideImportTokensModal: PropTypes.func.isRequired,
- isSelectActionModalOpen: PropTypes.bool.isRequired,
- hideSelectActionModal: PropTypes.func.isRequired,
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
isShowKeyringSnapRemovalResultModal: PropTypes.bool.isRequired,
hideShowKeyringSnapRemovalResultModal: PropTypes.func.isRequired,
@@ -520,25 +516,6 @@ export default class Routes extends Component {
return isHandlingPermissionsRequest || isHandlingAddEthereumChainRequest;
}
- showFooter() {
- if (Boolean(process.env.MULTICHAIN) === false) {
- return false;
- }
-
- const { location } = this.props;
- const isHomePage = Boolean(
- matchPath(location.pathname, { path: DEFAULT_ROUTE, exact: true }),
- );
- const isConnectionsPage = Boolean(
- matchPath(location.pathname, { path: CONNECTIONS, exact: true }),
- );
- const isAssetPage = Boolean(
- matchPath(location.pathname, { path: ASSET_ROUTE, exact: false }),
- );
-
- return isAssetPage || isHomePage || isConnectionsPage;
- }
-
showOnboardingHeader() {
const { location } = this.props;
@@ -580,14 +557,12 @@ export default class Routes extends Component {
toggleNetworkMenu,
accountDetailsAddress,
isImportTokensModalOpen,
- isSelectActionModalOpen,
location,
isImportNftsModalOpen,
hideImportNftsModal,
isIpfsModalOpen,
hideIpfsModal,
hideImportTokensModal,
- hideSelectActionModal,
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
isShowKeyringSnapRemovalResultModal,
hideShowKeyringSnapRemovalResultModal,
@@ -666,9 +641,6 @@ export default class Routes extends Component {
{isImportTokensModalOpen ? (
hideImportTokensModal()} />
) : null}
- {isSelectActionModalOpen ? (
- hideSelectActionModal()} />
- ) : null}
{
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
isShowKeyringSnapRemovalResultModal && (
@@ -684,7 +656,6 @@ export default class Routes extends Component {
{!isLoading && isNetworkLoading ? : null}
{this.renderRoutes()}
- {this.showFooter() &&
}
{isUnlocked ?
: null}
);
diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js
index a17d9af36dc5..9e6d00ff3779 100644
--- a/ui/pages/routes/routes.container.js
+++ b/ui/pages/routes/routes.container.js
@@ -30,7 +30,6 @@ import {
hideKeyringRemovalResultModal,
///: END:ONLY_INCLUDE_IF
} from '../../store/actions';
-import { hideSelectActionModal } from '../../components/multichain/app-footer/app-footer-actions';
import { pageChanged } from '../../ducks/history/history';
import { prepareToLeaveSwaps } from '../../ducks/swaps/swaps';
import { getSendStage } from '../../ducks/send';
@@ -79,7 +78,6 @@ function mapStateToProps(state) {
accountDetailsAddress: state.appState.accountDetailsAddress,
isImportNftsModalOpen: state.appState.importNftsModal.open,
isIpfsModalOpen: state.appState.showIpfsModalOpen,
- isSelectActionModalOpen: state.appState.showSelectActionModal,
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
isShowKeyringSnapRemovalResultModal:
state.appState.showKeyringRemovalSnapModal,
@@ -100,7 +98,6 @@ function mapDispatchToProps(dispatch) {
hideImportNftsModal: () => dispatch(hideImportNftsModal()),
hideIpfsModal: () => dispatch(hideIpfsModal()),
hideImportTokensModal: () => dispatch(hideImportTokensModal()),
- hideSelectActionModal: () => dispatch(hideSelectActionModal()),
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
hideShowKeyringSnapRemovalResultModal: () =>
dispatch(hideKeyringRemovalResultModal()),
diff --git a/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js
index 63c579c57705..5b3d43e5fc82 100644
--- a/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js
+++ b/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js
@@ -7,6 +7,7 @@ import {
import {
getMetaMaskAccounts,
getNativeCurrencyImage,
+ getSelectedInternalAccount,
} from '../../../../selectors';
import { updateSendAsset, getSendAsset } from '../../../../ducks/send';
import SendAssetRow from './send-asset-row.component';
@@ -14,7 +15,7 @@ import SendAssetRow from './send-asset-row.component';
function mapStateToProps(state) {
return {
tokens: state.metamask.tokens,
- selectedAddress: state.metamask.selectedAddress,
+ selectedAddress: getSelectedInternalAccount(state).address,
nfts: getNfts(state),
collections: getNftContracts(state),
sendAsset: getSendAsset(state),
diff --git a/ui/pages/send/send.test.js b/ui/pages/send/send.test.js
index fa8c9f22c3c9..b156f1d0848f 100644
--- a/ui/pages/send/send.test.js
+++ b/ui/pages/send/send.test.js
@@ -83,6 +83,24 @@ const baseStore = {
fast: '2',
},
selectedAddress: '0x0',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0x0',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
keyrings: [
{
type: KeyringType.hdKeyTree,
@@ -118,24 +136,6 @@ const baseStore = {
'0x0': { balance: '0x0', address: '0x0' },
},
identities: { '0x0': { address: '0x0' } },
- internalAccounts: {
- accounts: {
- 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
- address: '0x1',
- id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
- metadata: {
- name: 'Test Account',
- keyring: {
- type: 'HD Key Tree',
- },
- },
- options: {},
- methods: [...Object.values(EthMethod)],
- type: EthAccountType.Eoa,
- },
- },
- selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
- },
tokenAddress: '0x32e6c34cd57087abbd59b5a4aecc4cb495924356',
tokenList: {
'0x32e6c34cd57087abbd59b5a4aecc4cb495924356': {
diff --git a/ui/pages/settings/experimental-tab/__snapshots__/experimental-tab.test.js.snap b/ui/pages/settings/experimental-tab/__snapshots__/experimental-tab.test.js.snap
index 203f1481011b..14eaf56381ae 100644
--- a/ui/pages/settings/experimental-tab/__snapshots__/experimental-tab.test.js.snap
+++ b/ui/pages/settings/experimental-tab/__snapshots__/experimental-tab.test.js.snap
@@ -5,6 +5,72 @@ exports[`ExperimentalTab with desktop enabled renders ExperimentalTab component
+
+
+
+ Petnames
+
+
+ This allows you to assign a name to any address. This name will be visible to you only.
+
+
+
+
+
+
+
+ Off
+
+
+ On
+
+
+
+
+
diff --git a/ui/pages/settings/experimental-tab/experimental-tab.component.js b/ui/pages/settings/experimental-tab/experimental-tab.component.js
index 2f55e0703522..652f6d7112c4 100644
--- a/ui/pages/settings/experimental-tab/experimental-tab.component.js
+++ b/ui/pages/settings/experimental-tab/experimental-tab.component.js
@@ -49,6 +49,8 @@ export default class ExperimentalTab extends PureComponent {
///: END:ONLY_INCLUDE_IF
useRequestQueue: PropTypes.bool,
setUseRequestQueue: PropTypes.func,
+ petnamesEnabled: PropTypes.bool.isRequired,
+ setPetnamesEnabled: PropTypes.func.isRequired,
};
settingsRefs = Array(
@@ -118,6 +120,36 @@ export default class ExperimentalTab extends PureComponent {
}
}
+ renderTogglePetnames() {
+ const { t } = this.context;
+ const { petnamesEnabled, setPetnamesEnabled } = this.props;
+
+ return (
+
+
+
{t('petnamesEnabledToggle')}
+
+ {t('petnamesEnabledToggleDescription')}
+
+
+
+
+ setPetnamesEnabled(!value)}
+ offLabel={t('off')}
+ onLabel={t('on')}
+ dataTestId="toggle-petnames"
+ />
+
+
+ );
+ }
+
renderSecurityAlertsToggle() {
const { t } = this.context;
@@ -378,6 +410,7 @@ export default class ExperimentalTab extends PureComponent {
render() {
return (
+ {this.renderTogglePetnames()}
{this.renderSecurityAlertsToggle()}
{
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
diff --git a/ui/pages/settings/experimental-tab/experimental-tab.container.js b/ui/pages/settings/experimental-tab/experimental-tab.container.js
index 70e9ec5f2aa2..e94f9f460084 100644
--- a/ui/pages/settings/experimental-tab/experimental-tab.container.js
+++ b/ui/pages/settings/experimental-tab/experimental-tab.container.js
@@ -10,6 +10,7 @@ import {
setAddSnapAccountEnabled,
///: END:ONLY_INCLUDE_IF
setUseRequestQueue,
+ setPetnamesEnabled,
} from '../../../store/actions';
import {
getIsTransactionSecurityCheckEnabled,
@@ -20,10 +21,12 @@ import {
getIsAddSnapAccountEnabled,
///: END:ONLY_INCLUDE_IF
getUseRequestQueue,
+ getPetnamesEnabled,
} from '../../../selectors';
import ExperimentalTab from './experimental-tab.component';
const mapStateToProps = (state) => {
+ const petnamesEnabled = getPetnamesEnabled(state);
return {
transactionSecurityCheckEnabled:
getIsTransactionSecurityCheckEnabled(state),
@@ -36,6 +39,7 @@ const mapStateToProps = (state) => {
addSnapAccountEnabled: getIsAddSnapAccountEnabled(state),
///: END:ONLY_INCLUDE_IF
useRequestQueue: getUseRequestQueue(state),
+ petnamesEnabled,
};
};
@@ -51,6 +55,9 @@ const mapDispatchToProps = (dispatch) => {
setAddSnapAccountEnabled: (val) => setAddSnapAccountEnabled(val),
///: END:ONLY_INCLUDE_IF
setUseRequestQueue: (val) => dispatch(setUseRequestQueue(val)),
+ setPetnamesEnabled: (value) => {
+ return dispatch(setPetnamesEnabled(value));
+ },
};
};
diff --git a/ui/pages/settings/experimental-tab/experimental-tab.test.js b/ui/pages/settings/experimental-tab/experimental-tab.test.js
index 47046a699ea5..55c4a79b1983 100644
--- a/ui/pages/settings/experimental-tab/experimental-tab.test.js
+++ b/ui/pages/settings/experimental-tab/experimental-tab.test.js
@@ -37,12 +37,13 @@ describe('ExperimentalTab', () => {
const { getAllByRole } = render({ desktopEnabled: true });
const toggle = getAllByRole('checkbox');
- expect(toggle).toHaveLength(4);
+ expect(toggle).toHaveLength(5);
});
it('should disable opensea when blockaid is enabled', () => {
const setSecurityAlertsEnabled = jest.fn();
const setTransactionSecurityCheckEnabled = jest.fn();
+ const setPetnamesEnabled = jest.fn();
const { getAllByRole } = render(
{ desktopEnabled: true },
{
@@ -50,56 +51,67 @@ describe('ExperimentalTab', () => {
transactionSecurityCheckEnabled: true,
setSecurityAlertsEnabled,
setTransactionSecurityCheckEnabled,
+ petnamesEnabled: true,
+ setPetnamesEnabled,
},
);
const toggle = getAllByRole('checkbox');
- fireEvent.click(toggle[0]);
+ fireEvent.click(toggle[1]);
expect(setSecurityAlertsEnabled).toHaveBeenCalledWith(true);
expect(setTransactionSecurityCheckEnabled).toHaveBeenCalledWith(false);
});
- it('should show terms of use links', () => {
+ it('should disable blockaid when opensea is enabled', () => {
const setSecurityAlertsEnabled = jest.fn();
const setTransactionSecurityCheckEnabled = jest.fn();
+ const setPetnamesEnabled = jest.fn();
const { getAllByRole } = render(
{ desktopEnabled: true },
{
- securityAlertsEnabled: false,
- transactionSecurityCheckEnabled: true,
+ transactionSecurityCheckEnabled: false,
+ securityAlertsEnabled: true,
setSecurityAlertsEnabled,
setTransactionSecurityCheckEnabled,
+ petnamesEnabled: true,
+ setPetnamesEnabled,
},
);
- expect(getAllByRole('link', { name: 'Terms of use' })[0]).toHaveAttribute(
- 'href',
- 'https://opensea.io/securityproviderterms',
- );
+ const toggle = getAllByRole('checkbox');
+ fireEvent.click(toggle[2]);
+ expect(setTransactionSecurityCheckEnabled).toHaveBeenCalledWith(true);
+ expect(setSecurityAlertsEnabled).toHaveBeenCalledWith(false);
});
- it('should disable blockaid when opensea is enabled', () => {
+ it('should show terms of use links', () => {
const setSecurityAlertsEnabled = jest.fn();
const setTransactionSecurityCheckEnabled = jest.fn();
+ const setPetnamesEnabled = jest.fn();
const { getAllByRole } = render(
{ desktopEnabled: true },
{
- transactionSecurityCheckEnabled: false,
- securityAlertsEnabled: true,
+ securityAlertsEnabled: false,
+ transactionSecurityCheckEnabled: true,
setSecurityAlertsEnabled,
setTransactionSecurityCheckEnabled,
+ petnamesEnabled: true,
+ setPetnamesEnabled,
},
);
- const toggle = getAllByRole('checkbox');
- fireEvent.click(toggle[1]);
- expect(setTransactionSecurityCheckEnabled).toHaveBeenCalledWith(true);
- expect(setSecurityAlertsEnabled).toHaveBeenCalledWith(false);
+ expect(getAllByRole('link', { name: 'Terms of use' })[0]).toHaveAttribute(
+ 'href',
+ 'https://opensea.io/securityproviderterms',
+ );
});
it('should enable add account snap', async () => {
const setAddSnapAccountEnabled = jest.fn();
+ const setPetnamesEnabled = jest.fn();
const { getByTestId } = render(
{ desktopEnabled: true },
{
setAddSnapAccountEnabled,
+ petnamesEnabled: true,
+ setPetnamesEnabled,
},
);
@@ -110,4 +122,24 @@ describe('ExperimentalTab', () => {
expect(setAddSnapAccountEnabled).toHaveBeenCalledWith(true);
});
});
+
+ it('should disable petnames', async () => {
+ const setAddSnapAccountEnabled = jest.fn();
+ const setPetnamesEnabled = jest.fn();
+ const { getByTestId } = render(
+ { desktopEnabled: true },
+ {
+ setAddSnapAccountEnabled,
+ petnamesEnabled: true,
+ setPetnamesEnabled,
+ },
+ );
+
+ const toggle = getByTestId('toggle-petnames');
+ fireEvent.click(toggle);
+
+ await waitFor(() => {
+ expect(setPetnamesEnabled).toHaveBeenCalledWith(false);
+ });
+ });
});
diff --git a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap
index 491d51008209..c7cad7c779af 100644
--- a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap
+++ b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap
@@ -318,7 +318,7 @@ exports[`Security Tab should match snapshot 1`] = `
-
-
-
-
-
- Suggest address names
-
-
- We pull data from third parties like Etherscan, Infura, and Lens Protocol, to suggest names for addresses on signatures requests. Turning on name suggestions exposes your IP address to these third parties.
-
-
-
-
-
-
-
- Off
-
-
- On
-
-
-
-
-
-
diff --git a/ui/pages/swaps/smart-transaction-status/__snapshots__/reverted-icon.test.js.snap b/ui/pages/swaps/smart-transaction-status/__snapshots__/reverted-icon.test.js.snap
index bb26107a3957..fda252807661 100644
--- a/ui/pages/swaps/smart-transaction-status/__snapshots__/reverted-icon.test.js.snap
+++ b/ui/pages/swaps/smart-transaction-status/__snapshots__/reverted-icon.test.js.snap
@@ -11,11 +11,11 @@ exports[`RevertedIcon renders the RevertedIcon component 1`] = `
>
diff --git a/ui/pages/swaps/smart-transaction-status/__snapshots__/success-icon.test.js.snap b/ui/pages/swaps/smart-transaction-status/__snapshots__/success-icon.test.js.snap
index 9df4a837ad47..c42c5b700a21 100644
--- a/ui/pages/swaps/smart-transaction-status/__snapshots__/success-icon.test.js.snap
+++ b/ui/pages/swaps/smart-transaction-status/__snapshots__/success-icon.test.js.snap
@@ -11,7 +11,7 @@ exports[`SuccessIcon renders the SuccessIcon component 1`] = `
>
diff --git a/ui/pages/swaps/smart-transaction-status/arrow-icon.js b/ui/pages/swaps/smart-transaction-status/arrow-icon.js
index 54526c62b56c..ea9f7d1a80a5 100644
--- a/ui/pages/swaps/smart-transaction-status/arrow-icon.js
+++ b/ui/pages/swaps/smart-transaction-status/arrow-icon.js
@@ -11,7 +11,7 @@ export default function ArrowIcon() {
>
);
diff --git a/ui/pages/swaps/smart-transaction-status/reverted-icon.js b/ui/pages/swaps/smart-transaction-status/reverted-icon.js
index 57b6bfb3fdd8..7d0299cd8b8a 100644
--- a/ui/pages/swaps/smart-transaction-status/reverted-icon.js
+++ b/ui/pages/swaps/smart-transaction-status/reverted-icon.js
@@ -11,11 +11,11 @@ export default function RevertedIcon() {
>
);
diff --git a/ui/pages/swaps/smart-transaction-status/success-icon.js b/ui/pages/swaps/smart-transaction-status/success-icon.js
index fd6496b6612b..123ce944aa6e 100644
--- a/ui/pages/swaps/smart-transaction-status/success-icon.js
+++ b/ui/pages/swaps/smart-transaction-status/success-icon.js
@@ -11,7 +11,7 @@ export default function SuccessIcon() {
>
);
diff --git a/ui/pages/token-allowance/token-allowance.js b/ui/pages/token-allowance/token-allowance.js
index 4c4fc9f4c97d..2a0224186ce6 100644
--- a/ui/pages/token-allowance/token-allowance.js
+++ b/ui/pages/token-allowance/token-allowance.js
@@ -64,11 +64,6 @@ import { isSuspiciousResponse } from '../../../shared/modules/security-provider.
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
import BlockaidBannerAlert from '../../components/app/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert';
-import { MetaMetricsContext } from '../../contexts/metametrics';
-import {
- MetaMetricsEventCategory,
- MetaMetricsEventName,
-} from '../../../shared/constants/metametrics';
///: END:ONLY_INCLUDE_IF
import { ConfirmPageContainerNavigation } from '../../components/app/confirm-page-container';
@@ -213,22 +208,6 @@ export default function TokenAllowance({
const networkName =
NETWORK_TO_NAME_MAP[fullTxData.chainId] || networkIdentifier;
- ///: BEGIN:ONLY_INCLUDE_IF(blockaid)
- const trackEvent = useContext(MetaMetricsContext);
-
- const onClickSupportLink = useCallback(() => {
- trackEvent({
- category: MetaMetricsEventCategory.Transactions,
- event: MetaMetricsEventName.ExternalLinkClicked,
- properties: {
- action: 'Confirm Screen',
- origin: txData?.origin,
- external_link_clicked: 'security_alert_support_link',
- },
- });
- }, [trackEvent, txData?.origin]);
- ///: END:ONLY_INCLUDE_IF
-
const customNonceMerge = (transactionData) =>
customNonceValue
? {
@@ -400,11 +379,7 @@ export default function TokenAllowance({
/>
{
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
-
+
///: END:ONLY_INCLUDE_IF
}
{isSuspiciousResponse(txData?.securityProviderResponse) && (
diff --git a/ui/pages/token-details/token-details-page.test.js b/ui/pages/token-details/token-details-page.test.js
index 237f7441f7a2..6a4eba037425 100644
--- a/ui/pages/token-details/token-details-page.test.js
+++ b/ui/pages/token-details/token-details-page.test.js
@@ -1,5 +1,6 @@
import React from 'react';
import configureMockStore from 'redux-mock-store';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import { fireEvent } from '@testing-library/react';
import { renderWithProvider } from '../../../test/lib/render-helpers';
import Identicon from '../../components/ui/identicon';
@@ -10,6 +11,24 @@ const testTokenAddress = '0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F';
const state = {
metamask: {
selectedAddress: '0xAddress',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
contractExchangeRates: {
'0xAnotherToken': 0.015,
},
diff --git a/ui/selectors/confirm.test.ts b/ui/selectors/confirm.test.ts
index b18daa63b511..06adf67cb419 100644
--- a/ui/selectors/confirm.test.ts
+++ b/ui/selectors/confirm.test.ts
@@ -8,7 +8,7 @@ import {
describe('confirm selectors', () => {
const mockedState = {
confirm: {
- currentConfirmation: { dummy: 'dummy' },
+ currentConfirmation: { id: '1', type: 'contractInteraction' },
},
metamask: {
pendingApprovals: {
diff --git a/ui/selectors/confirm.ts b/ui/selectors/confirm.ts
index be5c1263efd1..b416e4992430 100644
--- a/ui/selectors/confirm.ts
+++ b/ui/selectors/confirm.ts
@@ -1,14 +1,16 @@
import { ApprovalType } from '@metamask/controller-utils';
import { ApprovalControllerState } from '@metamask/approval-controller';
+import { TransactionType } from '@metamask/transaction-controller';
import { getPendingApprovals } from './approvals';
type Confirmation = {
+ chainId?: string;
+ id: string;
msgParams?: {
from: string;
};
- chainId?: string;
- id: string;
+ type: TransactionType;
};
type ConfirmMetamaskState = {
diff --git a/ui/selectors/permissions.js b/ui/selectors/permissions.js
index d8051433d318..2b3ceb2ac381 100644
--- a/ui/selectors/permissions.js
+++ b/ui/selectors/permissions.js
@@ -6,9 +6,10 @@ import { CaveatTypes } from '../../shared/constants/permissions';
import { getApprovalRequestsByType } from './approvals';
import { createDeepEqualSelector } from './util';
import {
+ getInternalAccount,
getMetaMaskAccountsOrdered,
getOriginOfCurrentTab,
- getSelectedAddress,
+ getSelectedInternalAccount,
getSubjectMetadata,
getTargetSubjectMetadata,
} from '.';
@@ -250,23 +251,26 @@ function subjectSelector(state, origin) {
}
export function getAccountToConnectToActiveTab(state) {
- const selectedAddress = getSelectedAddress(state);
+ const selectedInternalAccount = getSelectedInternalAccount(state);
const connectedAccounts = getPermittedAccountsForCurrentTab(state);
const {
- metamask: { identities },
+ metamask: {
+ internalAccounts: { accounts },
+ },
} = state;
- const numberOfAccounts = Object.keys(identities).length;
+ const numberOfAccounts = Object.keys(accounts).length;
if (
connectedAccounts.length &&
connectedAccounts.length !== numberOfAccounts
) {
if (
- connectedAccounts.findIndex((address) => address === selectedAddress) ===
- -1
+ connectedAccounts.findIndex(
+ (address) => address === selectedInternalAccount.address,
+ ) === -1
) {
- return identities[selectedAddress];
+ return getInternalAccount(state, selectedInternalAccount.id);
}
}
diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js
index 575e17b67af1..57bdd2f76843 100644
--- a/ui/selectors/selectors.js
+++ b/ui/selectors/selectors.js
@@ -75,9 +75,6 @@ import {
isEIP1559Network,
getLedgerTransportType,
isAddressLedger,
- ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
- findKeyringForAddress,
- ///: END:ONLY_INCLUDE_IF
} from '../ducks/metamask/metamask';
import {
getLedgerWebHidConnectedStatus,
@@ -97,7 +94,6 @@ import {
NOTIFICATION_DROP_LEDGER_FIREFOX,
NOTIFICATION_OPEN_BETA_SNAPS,
NOTIFICATION_U2F_LEDGER_LIVE,
- NOTIFICATION_STAKING_PORTFOLIO,
} from '../../shared/notifications';
import {
SURVEY_DATE,
@@ -303,18 +299,29 @@ export function getSelectedIdentity(state) {
return identities[selectedAddress];
}
+export function getInternalAccountByAddress(state, address) {
+ return Object.values(state.metamask.internalAccounts.accounts).find(
+ (account) => isEqualCaseInsensitive(account.address, address),
+ );
+}
+
export function getSelectedInternalAccount(state) {
const accountId = state.metamask.internalAccounts.selectedAccount;
return state.metamask.internalAccounts.accounts[accountId];
}
+export function checkIfMethodIsEnabled(state, methodName) {
+ const internalAccount = getSelectedInternalAccount(state);
+ return Boolean(internalAccount.methods.includes(methodName));
+}
+
export function getSelectedInternalAccountWithBalance(state) {
const selectedAccount = getSelectedInternalAccount(state);
const rawAccount = getMetaMaskAccountBalances(state)[selectedAccount.address];
const selectedAccountWithBalance = {
...selectedAccount,
- balance: rawAccount ? rawAccount.balance : 0,
+ balance: rawAccount ? rawAccount.balance : '0x0',
};
return selectedAccountWithBalance;
@@ -410,8 +417,9 @@ export const getMetaMaskAccountsConnected = createSelector(
);
export function isBalanceCached(state) {
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
const selectedAccountBalance =
- getMetaMaskAccountBalances(state)[getSelectedAddress(state)]?.balance;
+ getMetaMaskAccountBalances(state)[selectedAddress]?.balance;
const cachedBalance = getSelectedAccountCachedBalance(state);
return Boolean(!selectedAccountBalance && cachedBalance);
@@ -465,9 +473,7 @@ export function getEnsResolutionByAddress(state, address) {
const entry =
getAddressBookEntry(state, address) ||
- Object.values(state.metamask.identities).find((identity) =>
- isEqualCaseInsensitive(identity.address, address),
- );
+ getInternalAccountByAddress(state, address);
return entry?.name || '';
}
@@ -493,11 +499,11 @@ export function getAddressBookEntryOrAccountName(state, address) {
return internalAccount?.metadata.name || address;
}
-export function getAccountName(identities, address) {
- const entry = Object.values(identities).find((identity) =>
- isEqualCaseInsensitive(identity.address, address),
+export function getAccountName(accounts, accountAddress) {
+ const account = accounts.find((internalAccount) =>
+ isEqualCaseInsensitive(internalAccount.address, accountAddress),
);
- return entry && entry.name !== '' ? entry.name : '';
+ return account && account.metadata.name !== '' ? account.metadata.name : '';
}
export function getMetadataContractName(state, address) {
@@ -537,7 +543,7 @@ export function getAccountsWithLabels(state) {
}
export function getCurrentAccountWithSendEtherInfo(state) {
- const currentAddress = getSelectedAddress(state);
+ const { address: currentAddress } = getSelectedInternalAccount(state);
const accounts = accountsWithSendEtherInfoSelector(state);
return getAccountByAddress(accounts, currentAddress);
@@ -667,6 +673,11 @@ export function getShowTestNetworks(state) {
return Boolean(showTestNetworks);
}
+export function getPetnamesEnabled(state) {
+ const { petnamesEnabled = true } = getPreferences(state);
+ return petnamesEnabled;
+}
+
export function getShowExtensionInFullSizeView(state) {
const { showExtensionInFullSizeView } = getPreferences(state);
return Boolean(showExtensionInFullSizeView);
@@ -992,6 +1003,11 @@ export const getMemoizedMetaMaskIdentities = createDeepEqualSelector(
(identities) => identities,
);
+export const getMemoizedMetaMaskInternalAccounts = createDeepEqualSelector(
+ getInternalAccounts,
+ (internalAccounts) => internalAccounts,
+);
+
export const getMemoizedAddressBook = createDeepEqualSelector(
getAddressBook,
(addressBook) => addressBook,
@@ -1212,7 +1228,6 @@ function getAllowedAnnouncementIds(state) {
[NOTIFICATION_OPEN_BETA_SNAPS]: true,
[NOTIFICATION_BUY_SELL_BUTTON]: true,
[NOTIFICATION_U2F_LEDGER_LIVE]: currentKeyringIsLedger && !isFirefox,
- [NOTIFICATION_STAKING_PORTFOLIO]: true,
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
[NOTIFICATION_BLOCKAID_DEFAULT]: true,
///: END:ONLY_INCLUDE_IF
@@ -1665,7 +1680,7 @@ export function getIsDynamicTokenListAvailable(state) {
*/
export function getDetectedTokensInCurrentNetwork(state) {
const currentChainId = getCurrentChainId(state);
- const selectedAddress = getSelectedAddress(state);
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
return state.metamask.allDetectedTokens?.[currentChainId]?.[selectedAddress];
}
@@ -1831,7 +1846,12 @@ export function getAllAccountsOnNetworkAreEmpty(state) {
export function getShouldShowSeedPhraseReminder(state) {
const { tokens, seedPhraseBackedUp, dismissSeedBackUpReminder } =
state.metamask;
- const accountBalance = getCurrentEthBalance(state) ?? 0;
+
+ // if there is no account, we don't need to show the seed phrase reminder
+ const accountBalance = getSelectedInternalAccount(state)
+ ? getCurrentEthBalance(state)
+ : 0;
+
return (
seedPhraseBackedUp === false &&
(parseInt(accountBalance, 16) > 0 || tokens.length > 0) &&
@@ -1978,13 +1998,14 @@ export function getSnapRegistry(state) {
}
export function getKeyringSnapAccounts(state) {
- const identities = getMetaMaskIdentities(state);
+ const internalAccounts = getInternalAccounts(state);
- const keyringAccounts = Object.values(identities).filter((identity) => {
- return (
- findKeyringForAddress(state, identity.address).type === 'Snap Keyring'
- );
- });
+ const keyringAccounts = Object.values(internalAccounts).filter(
+ (internalAccount) => {
+ const { keyring } = internalAccount.metadata;
+ return keyring.type === KeyringType.snap;
+ },
+ );
return keyringAccounts;
}
diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js
index daa32d2d48b5..a66cd80c281c 100644
--- a/ui/selectors/selectors.test.js
+++ b/ui/selectors/selectors.test.js
@@ -808,6 +808,41 @@ describe('Selectors', () => {
expect(isDesktopEnabled).toBeFalsy();
});
+ describe('#getPetnamesEnabled', () => {
+ function createMockStateWithPetnamesEnabled(petnamesEnabled) {
+ return { metamask: { preferences: { petnamesEnabled } } };
+ }
+
+ describe('usePetnamesEnabled', () => {
+ const tests = [
+ {
+ petnamesEnabled: true,
+ expectedResult: true,
+ },
+ {
+ petnamesEnabled: false,
+ expectedResult: false,
+ },
+ {
+ // Petnames is enabled by default.
+ petnamesEnabled: undefined,
+ expectedResult: true,
+ },
+ ];
+
+ tests.forEach(({ petnamesEnabled, expectedResult }) => {
+ it(`should return ${String(
+ expectedResult,
+ )} when petnames preference is ${String(petnamesEnabled)}`, () => {
+ const result = selectors.getPetnamesEnabled(
+ createMockStateWithPetnamesEnabled(petnamesEnabled),
+ );
+ expect(result).toBe(expectedResult);
+ });
+ });
+ });
+ });
+
it('#getIsBridgeChain', () => {
mockState.metamask.providerConfig.chainId = '0xa';
const isOptimismSupported = selectors.getIsBridgeChain(mockState);
@@ -1026,3 +1061,95 @@ describe('Selectors', () => {
).toStrictEqual(expectedResult);
});
});
+
+describe('#getKeyringSnapAccounts', () => {
+ it('returns an empty array if no keyring snap accounts exist', () => {
+ const state = {
+ metamask: {
+ internalAccounts: {
+ accounts: {
+ 1: {
+ address: '0x123456789',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ },
+ 2: {
+ address: '0x987654321',
+ metadata: {
+ name: 'Account 2',
+ keyring: {
+ type: 'Simple Key Pair',
+ },
+ },
+ },
+ },
+ },
+ },
+ };
+
+ expect(selectors.getKeyringSnapAccounts(state)).toStrictEqual([]);
+ });
+
+ it('returns an array of keyring snap accounts', () => {
+ const state = {
+ metamask: {
+ internalAccounts: {
+ accounts: {
+ 'mock-id-1': {
+ address: '0x123456789',
+ metadata: {
+ name: 'Account 1',
+ keyring: {
+ type: 'Ledger',
+ },
+ },
+ },
+ 'mock-id-2': {
+ address: '0x987654321',
+ metadata: {
+ name: 'Account 2',
+ keyring: {
+ type: 'Snap Keyring',
+ },
+ },
+ },
+ 'mock-id-3': {
+ address: '0xabcdef123',
+ metadata: {
+ name: 'Account 3',
+ keyring: {
+ type: 'Snap Keyring',
+ },
+ },
+ },
+ },
+ },
+ },
+ };
+
+ expect(selectors.getKeyringSnapAccounts(state)).toStrictEqual([
+ {
+ address: '0x987654321',
+ metadata: {
+ name: 'Account 2',
+ keyring: {
+ type: 'Snap Keyring',
+ },
+ },
+ },
+ {
+ address: '0xabcdef123',
+ metadata: {
+ name: 'Account 3',
+ keyring: {
+ type: 'Snap Keyring',
+ },
+ },
+ },
+ ]);
+ });
+});
diff --git a/ui/selectors/transactions.js b/ui/selectors/transactions.js
index c3809992122e..5c116b2cd866 100644
--- a/ui/selectors/transactions.js
+++ b/ui/selectors/transactions.js
@@ -12,7 +12,7 @@ import txHelper from '../helpers/utils/tx-helper';
import { SmartTransactionStatus } from '../../shared/constants/transaction';
import { hexToDecimal } from '../../shared/modules/conversion.utils';
import { getProviderConfig } from '../ducks/metamask/metamask';
-import { getCurrentChainId, getSelectedAddress } from './selectors';
+import { getCurrentChainId, getSelectedInternalAccount } from './selectors';
import { hasPendingApprovals, getApprovalRequestsByType } from './approvals';
import { createDeepEqualSelector } from './util';
@@ -56,6 +56,19 @@ export const getUnapprovedTransactions = createDeepEqualSelector(
(transactions) => transactions,
);
+export const getApprovedAndSignedTransactions = createDeepEqualSelector(
+ (state) => {
+ const currentNetworkTransactions = getCurrentNetworkTransactions(state);
+
+ return currentNetworkTransactions.filter((transaction) =>
+ [TransactionStatus.approved, TransactionStatus.signed].includes(
+ transaction.status,
+ ),
+ );
+ },
+ (transactions) => transactions,
+);
+
export const incomingTxListSelector = createDeepEqualSelector(
(state) => {
const { incomingTransactionsPreferences } = state.metamask;
@@ -64,7 +77,7 @@ export const incomingTxListSelector = createDeepEqualSelector(
}
const currentNetworkTransactions = getCurrentNetworkTransactions(state);
- const selectedAddress = getSelectedAddress(state);
+ const { address: selectedAddress } = getSelectedInternalAccount(state);
return currentNetworkTransactions.filter(
(tx) =>
@@ -98,12 +111,14 @@ export const smartTransactionsListSelector = (state) =>
}));
export const selectedAddressTxListSelector = createSelector(
- getSelectedAddress,
+ getSelectedInternalAccount,
getCurrentNetworkTransactions,
smartTransactionsListSelector,
- (selectedAddress, transactions = [], smTransactions = []) => {
+ (selectedInternalAccount, transactions = [], smTransactions = []) => {
return transactions
- .filter(({ txParams }) => txParams.from === selectedAddress)
+ .filter(
+ ({ txParams }) => txParams.from === selectedInternalAccount.address,
+ )
.filter(({ type }) => type !== TransactionType.incoming)
.concat(smTransactions);
},
diff --git a/ui/selectors/transactions.test.js b/ui/selectors/transactions.test.js
index 5a4ecd408bd1..16a57a004fe8 100644
--- a/ui/selectors/transactions.test.js
+++ b/ui/selectors/transactions.test.js
@@ -1,4 +1,5 @@
import { ApprovalType } from '@metamask/controller-utils';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import { TransactionStatus } from '@metamask/transaction-controller';
import { CHAIN_IDS } from '../../shared/constants/network';
import {
@@ -9,6 +10,7 @@ import {
nonceSortedCompletedTransactionsSelector,
submittedPendingTransactionsSelector,
hasTransactionPendingApprovals,
+ getApprovedAndSignedTransactions,
} from './transactions';
describe('Transaction Selectors', () => {
@@ -34,6 +36,24 @@ describe('Transaction Selectors', () => {
providerConfig: {
chainId: '0x5',
},
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
},
};
@@ -115,6 +135,24 @@ describe('Transaction Selectors', () => {
},
featureFlags: {},
selectedAddress: '0xAddress',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
transactions: [
{
id: 0,
@@ -156,6 +194,21 @@ describe('Transaction Selectors', () => {
},
featureFlags: {},
selectedAddress: '0xAddress',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ address: '0xAddress',
+ },
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
transactions: [
{
id: 0,
@@ -231,6 +284,24 @@ describe('Transaction Selectors', () => {
chainId: CHAIN_IDS.MAINNET,
},
selectedAddress: '0xAddress',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
featureFlags: {},
transactions: [tx1, tx2],
},
@@ -317,6 +388,24 @@ describe('Transaction Selectors', () => {
chainId: CHAIN_IDS.MAINNET,
},
selectedAddress: '0xAddress',
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
featureFlags: {},
transactions: [submittedTx, unapprovedTx, approvedTx, confirmedTx],
},
@@ -456,4 +545,50 @@ describe('Transaction Selectors', () => {
},
);
});
+
+ describe('getApprovedAndSignedTransactions', () => {
+ it('returns transactions with status of approved or signed on current network', () => {
+ const state = {
+ metamask: {
+ providerConfig: {
+ chainId: CHAIN_IDS.MAINNET,
+ },
+ transactions: [
+ {
+ id: 0,
+ chainId: CHAIN_IDS.MAINNET,
+ status: TransactionStatus.approved,
+ },
+ {
+ id: 1,
+ chainId: CHAIN_IDS.MAINNET,
+ status: TransactionStatus.submitted,
+ },
+ {
+ id: 2,
+ chainId: CHAIN_IDS.MAINNET,
+ status: TransactionStatus.unapproved,
+ },
+ {
+ id: 3,
+ chainId: CHAIN_IDS.MAINNET,
+ status: TransactionStatus.signed,
+ },
+ {
+ id: 4,
+ chainId: CHAIN_IDS.GOERLI,
+ status: TransactionStatus.signed,
+ },
+ ],
+ },
+ };
+
+ const results = getApprovedAndSignedTransactions(state);
+
+ expect(results).toStrictEqual([
+ state.metamask.transactions[0],
+ state.metamask.transactions[3],
+ ]);
+ });
+ });
});
diff --git a/ui/store/actionConstants.ts b/ui/store/actionConstants.ts
index 51108a0c909e..12b939eecf87 100644
--- a/ui/store/actionConstants.ts
+++ b/ui/store/actionConstants.ts
@@ -17,8 +17,6 @@ export const SHOW_IPFS_MODAL_OPEN = 'UI_IPFS_MODAL_OPEN';
export const SHOW_IPFS_MODAL_CLOSE = 'UI_IPFS_MODAL_CLOSE';
export const IMPORT_TOKENS_POPOVER_OPEN = 'UI_IMPORT_TOKENS_POPOVER_OPEN';
export const IMPORT_TOKENS_POPOVER_CLOSE = 'UI_IMPORT_TOKENS_POPOVER_CLOSE';
-export const SELECT_ACTION_MODAL_OPEN = 'UI_SELECT_ACTION_MODAL_OPEN';
-export const SELECT_ACTION_MODAL_CLOSE = 'UI_SELECT_ACTION_MODAL_CLOSE';
// remote state
export const UPDATE_METAMASK_STATE = 'UPDATE_METAMASK_STATE';
diff --git a/ui/store/actions.test.js b/ui/store/actions.test.js
index 529c6eb46777..a2f74da3b759 100644
--- a/ui/store/actions.test.js
+++ b/ui/store/actions.test.js
@@ -1,6 +1,7 @@
import sinon from 'sinon';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
+import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import { TransactionStatus } from '@metamask/transaction-controller';
import enLocale from '../../app/_locales/en/messages.json';
import MetaMaskController from '../../app/scripts/metamask-controller';
@@ -22,6 +23,24 @@ const defaultState = {
balance: '0x0',
},
},
+ internalAccounts: {
+ accounts: {
+ 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': {
+ address: '0xFirstAddress',
+ id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3',
+ },
identities: {
'0xFirstAddress': {},
},
@@ -44,6 +63,7 @@ describe('Actions', () => {
background.signMessage = sinon.stub();
background.signPersonalMessage = sinon.stub();
background.signTypedMessage = sinon.stub();
+ background.abortTransactionSigning = sinon.stub();
});
describe('#tryUnlockMetamask', () => {
@@ -237,6 +257,24 @@ describe('Actions', () => {
identities: {
'0xAnotherAddress': {},
},
+ internalAccounts: {
+ accounts: {
+ '22497cc9-e791-42b8-adef-2f13ef216b86': {
+ address: '0xAnotherAddress',
+ id: '22497cc9-e791-42b8-adef-2f13ef216b86',
+ metadata: {
+ name: 'Test Account 2',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: '22497cc9-e791-42b8-adef-2f13ef216b86',
+ },
}),
);
@@ -818,33 +856,89 @@ describe('Actions', () => {
it('#setSelectedAccount', async () => {
const store = mockStore({
activeTab: {},
- metamask: { alertEnabledness: {}, selectedAddress: '0x123' },
+ metamask: {
+ alertEnabledness: {},
+ internalAccounts: {
+ accounts: {
+ 'mock-id': {
+ address: '0x123',
+ id: 'mock-id',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [
+ 'personal_sign',
+ 'eth_sign',
+ 'eth_signTransaction',
+ 'eth_signTypedData_v1',
+ 'eth_signTypedData_v3',
+ 'eth_signTypedData_v4',
+ ],
+ type: 'eip155:eoa',
+ },
+ },
+ selectedAccount: 'mock-id',
+ },
+ },
});
- const setSelectedAddressSpy = sinon.stub().callsFake((_, cb) => cb());
+ const setSelectedInternalAccountSpy = sinon
+ .stub()
+ .callsFake((_, cb) => cb());
background.getApi.returns({
- setSelectedAddress: setSelectedAddressSpy,
+ setSelectedInternalAccount: setSelectedInternalAccountSpy,
});
setBackgroundConnection(background.getApi());
- await store.dispatch(actions.setSelectedAccount());
- expect(setSelectedAddressSpy.callCount).toStrictEqual(1);
+ await store.dispatch(actions.setSelectedAccount('0x123'));
+ expect(setSelectedInternalAccountSpy.callCount).toStrictEqual(1);
});
it('displays warning if setSelectedAccount throws', async () => {
const store = mockStore({
activeTab: {},
- metamask: { alertEnabledness: {}, selectedAddress: '0x123' },
+ metamask: {
+ alertEnabledness: {},
+ internalAccounts: {
+ accounts: {
+ 'mock-id': {
+ address: '0x123',
+ id: 'mock-id',
+ metadata: {
+ name: 'Test Account',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [
+ 'personal_sign',
+ 'eth_sign',
+ 'eth_signTransaction',
+ 'eth_signTypedData_v1',
+ 'eth_signTypedData_v3',
+ 'eth_signTypedData_v4',
+ ],
+ type: 'eip155:eoa',
+ },
+ },
+ selectedAccount: 'mock-id',
+ },
+ },
});
- const setSelectedAddressSpy = sinon
+ const setSelectedInternalAccountSpy = sinon
.stub()
.callsFake((_, cb) => cb(new Error('error')));
background.getApi.returns({
- setSelectedAddress: setSelectedAddressSpy,
+ setSelectedInternalAccount: setSelectedInternalAccountSpy,
});
setBackgroundConnection(background.getApi());
@@ -855,7 +949,7 @@ describe('Actions', () => {
{ type: 'HIDE_LOADING_INDICATION' },
];
- await store.dispatch(actions.setSelectedAccount());
+ await store.dispatch(actions.setSelectedAccount('0x123'));
expect(store.getActions()).toStrictEqual(expectedActions);
});
});
@@ -1976,6 +2070,29 @@ describe('Actions', () => {
identities: {
'0xFirstAddress': {},
},
+ internalAccounts: {
+ accounts: {
+ '8e110453-2231-4e62-82de-29b913dfef4b': {
+ address: '0xFirstAddress',
+ id: '8e110453-2231-4e62-82de-29b913dfef4b',
+ metadata: {
+ name: 'Test Account 2',
+ keyring: {
+ type: 'HD Key Tree',
+ },
+ },
+ options: {},
+ methods: [...Object.values(EthMethod)],
+ type: EthAccountType.Eoa,
+ },
+ },
+ selectedAccount: '8e110453-2231-4e62-82de-29b913dfef4b',
+ },
+ cachedBalances: {
+ '0x1': {
+ '0xFirstAddress': '0x0',
+ },
+ },
}),
),
});
@@ -1994,6 +2111,23 @@ describe('Actions', () => {
});
});
+ describe('abortTransactionSigning', () => {
+ it('submits request to background', async () => {
+ const transactionIdMock = '123-456';
+ const store = mockStore();
+
+ setBackgroundConnection(background);
+
+ store.dispatch(actions.abortTransactionSigning(transactionIdMock));
+
+ expect(background.abortTransactionSigning.callCount).toStrictEqual(1);
+ expect(background.abortTransactionSigning.getCall(0).args).toStrictEqual([
+ transactionIdMock,
+ expect.any(Function),
+ ]);
+ });
+ });
+
describe('Desktop', () => {
describe('#setDesktopEnabled', () => {
it('calls background setDesktopEnabled method', async () => {
diff --git a/ui/store/actions.ts b/ui/store/actions.ts
index aedd6ebf888a..d0ae1fbf115c 100644
--- a/ui/store/actions.ts
+++ b/ui/store/actions.ts
@@ -38,7 +38,6 @@ import { getEnvironmentType, addHexPrefix } from '../../app/scripts/lib/util';
import {
getMetaMaskAccounts,
getPermittedAccountsForCurrentTab,
- getSelectedAddress,
hasTransactionPendingApprovals,
getApprovalFlows,
getCurrentNetworkTransactions,
@@ -50,6 +49,8 @@ import {
getPermissionSubjects,
getFirstSnapInstallOrUpdateRequest,
///: END:ONLY_INCLUDE_IF
+ getInternalAccountByAddress,
+ getSelectedInternalAccount,
} from '../selectors';
import {
computeEstimatedGasLimit,
@@ -1550,12 +1551,15 @@ export function updateMetamaskState(
const providerConfig = getProviderConfig(state);
const { metamask: currentState } = state;
- const { currentLocale, selectedAddress } = currentState;
- const {
- currentLocale: newLocale,
- selectedAddress: newSelectedAddress,
- providerConfig: newProviderConfig,
- } = newState;
+ const { currentLocale } = currentState;
+ const currentInternalAccount = getSelectedInternalAccount(state);
+ const selectedAddress = currentInternalAccount?.address;
+ const { currentLocale: newLocale, providerConfig: newProviderConfig } =
+ newState;
+ const newInternalAccount = getSelectedInternalAccount({
+ metamask: newState,
+ });
+ const newSelectedAddress = newInternalAccount?.address;
if (currentLocale && newLocale && currentLocale !== newLocale) {
dispatch(updateCurrentLocale(newLocale));
@@ -1700,6 +1704,34 @@ export function setSelectedAddress(
};
}
+async function _setSelectedInternalAccount(accountId: string): Promise
{
+ log.debug(`background.setSelectedInternalAccount`);
+ await submitRequestToBackground('setSelectedInternalAccount', [accountId]);
+}
+
+/**
+ * Sets the selected internal account.
+ *
+ * @param accountId - The ID of the account to set as selected.
+ * @returns A thunk action that dispatches loading and warning indications.
+ */
+export function setSelectedInternalAccount(
+ accountId: string,
+): ThunkAction {
+ return async (dispatch: MetaMaskReduxDispatch) => {
+ dispatch(showLoadingIndication());
+ log.debug(`background.setSelectedInternalAccount`);
+ try {
+ await _setSelectedInternalAccount(accountId);
+ } catch (error) {
+ dispatch(displayWarning(error));
+ return;
+ } finally {
+ dispatch(hideLoadingIndication());
+ }
+ };
+}
+
export function setSelectedAccount(
address: string,
): ThunkAction {
@@ -1711,12 +1743,12 @@ export function setSelectedAccount(
const unconnectedAccountAccountAlertIsEnabled =
getUnconnectedAccountAlertEnabledness(state);
const activeTabOrigin = state.activeTab.origin;
- const selectedAddress = getSelectedAddress(state);
+ const internalAccount = getInternalAccountByAddress(state, address);
const permittedAccountsForCurrentTab =
getPermittedAccountsForCurrentTab(state);
const currentTabIsConnectedToPreviousAddress =
Boolean(activeTabOrigin) &&
- permittedAccountsForCurrentTab.includes(selectedAddress);
+ permittedAccountsForCurrentTab.includes(internalAccount.address);
const currentTabIsConnectedToNextAddress =
Boolean(activeTabOrigin) &&
permittedAccountsForCurrentTab.includes(address);
@@ -1725,7 +1757,7 @@ export function setSelectedAccount(
!currentTabIsConnectedToNextAddress;
try {
- await _setSelectedAddress(address);
+ await _setSelectedInternalAccount(internalAccount.id);
await forceUpdateMetamaskState(dispatch);
} catch (error) {
dispatch(displayWarning(error));
@@ -2085,6 +2117,20 @@ export function clearPendingTokens(): Action {
};
}
+export function abortTransactionSigning(
+ transactionId: string,
+): ThunkAction, MetaMaskReduxState, any, AnyAction> {
+ return async (dispatch: MetaMaskReduxDispatch) => {
+ try {
+ await submitRequestToBackground('abortTransactionSigning', [
+ transactionId,
+ ]);
+ } catch (error) {
+ dispatch(displayWarning(error));
+ }
+ };
+}
+
export function createCancelTransaction(
txId: string,
customGasSettings: CustomGasSettings,
@@ -2841,6 +2887,10 @@ export function setShowTestNetworks(value: boolean) {
return setPreference('showTestNetworks', value);
}
+export function setPetnamesEnabled(value: boolean) {
+ return setPreference('petnamesEnabled', value);
+}
+
export function setShowExtensionInFullSizeView(value: boolean) {
return setPreference('showExtensionInFullSizeView', value);
}
@@ -3303,6 +3353,11 @@ export function setSwapsFeatureFlags(
};
}
+type Quotes = [
+ { destinationAmount: string; decimals: number; aggregator: string },
+ string,
+];
+
export function fetchAndSetQuotes(
fetchParams: {
slippage: string;
@@ -3319,19 +3374,9 @@ export function fetchAndSetQuotes(
accountBalance: string;
chainId: string;
},
-): ThunkAction<
- Promise<
- [
- { destinationAmount: string; decimals: number; aggregator: string },
- string,
- ]
- >,
- MetaMaskReduxState,
- unknown,
- AnyAction
-> {
+): ThunkAction, MetaMaskReduxState, unknown, AnyAction> {
return async (dispatch: MetaMaskReduxDispatch) => {
- const [quotes, selectedAggId] = await submitRequestToBackground(
+ const [quotes, selectedAggId] = await submitRequestToBackground(
'fetchAndSetQuotes',
[fetchParams, fetchParamsMetaData],
);
@@ -4018,7 +4063,7 @@ export function getNextNonce(): ThunkAction<
AnyAction
> {
return async (dispatch, getState) => {
- const address = getState().metamask.selectedAddress;
+ const { address } = getSelectedInternalAccount(getState());
let nextNonce;
try {
nextNonce = await submitRequestToBackground('getNextNonce', [
@@ -4583,7 +4628,6 @@ export function setUseRequestQueue(val: boolean): void {
}
}
-///: BEGIN:ONLY_INCLUDE_IF(petnames)
export function setUseExternalNameSources(val: boolean): void {
try {
submitRequestToBackground('setUseExternalNameSources', [val]);
@@ -4591,7 +4635,6 @@ export function setUseExternalNameSources(val: boolean): void {
logErrorWithMessage(error);
}
}
-///: END:ONLY_INCLUDE_IF
export function setFirstTimeUsedNetwork(chainId: string) {
return submitRequestToBackground('setFirstTimeUsedNetwork', [chainId]);
diff --git a/yarn.lock b/yarn.lock
index 4089b12fcebe..af939e0545ea 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -163,7 +163,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.20.7, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2":
+"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.22.5, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2":
version: 7.23.6
resolution: "@babel/generator@npm:7.23.6"
dependencies:
@@ -1432,7 +1432,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.22.9, @babel/preset-env@npm:^7.23.2":
+"@babel/preset-env@npm:^7.22.9, @babel/preset-env@npm:^7.23.2":
version: 7.23.2
resolution: "@babel/preset-env@npm:7.23.2"
dependencies:
@@ -1548,7 +1548,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.22.15, @babel/preset-react@npm:^7.22.5":
+"@babel/preset-react@npm:^7.22.15, @babel/preset-react@npm:^7.22.5":
version: 7.22.15
resolution: "@babel/preset-react@npm:7.22.15"
dependencies:
@@ -1564,7 +1564,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.18.6, @babel/preset-typescript@npm:^7.23.2":
+"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.2":
version: 7.23.2
resolution: "@babel/preset-typescript@npm:7.23.2"
dependencies:
@@ -1629,7 +1629,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/template@npm:^7.20.7, @babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3":
+"@babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3":
version: 7.22.15
resolution: "@babel/template@npm:7.22.15"
dependencies:
@@ -1640,7 +1640,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/traverse@npm:7.23.7, @babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.5, @babel/traverse@npm:^7.22.8, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.7.2":
+"@babel/traverse@npm:7.23.7, @babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.5, @babel/traverse@npm:^7.22.8, @babel/traverse@npm:^7.23.2":
version: 7.23.7
resolution: "@babel/traverse@npm:7.23.7"
dependencies:
@@ -1921,13 +1921,6 @@ __metadata:
languageName: node
linkType: hard
-"@endo/env-options@npm:^0.1.4":
- version: 0.1.4
- resolution: "@endo/env-options@npm:0.1.4"
- checksum: 0d6b82bdf07602dfc373a475234a206b61e9d0ab6ea886fdcbd111a37d9ce4e55ead5dbc1c7af52cf67a11a7185b40e7b30c3367da3928897082502d7e1274f1
- languageName: node
- linkType: hard
-
"@endo/env-options@npm:^1.1.0":
version: 1.1.0
resolution: "@endo/env-options@npm:1.1.0"
@@ -1936,14 +1929,14 @@ __metadata:
linkType: hard
"@ensdomains/content-hash@npm:^2.5.6":
- version: 2.5.6
- resolution: "@ensdomains/content-hash@npm:2.5.6"
+ version: 2.5.7
+ resolution: "@ensdomains/content-hash@npm:2.5.7"
dependencies:
cids: "npm:^1.1.5"
js-base64: "npm:^3.6.0"
- multicodec: "npm:^2.1.0"
+ multicodec: "npm:^3.2.0"
multihashes: "npm:^2.0.0"
- checksum: b93714894574eadfc9bc84dc34548f8cf99172714bc9d55f1fc4768fe840743981c1e005249b5aca165670a66a2df7cebfb0cf8c1c5ba652acc64028d61fd200
+ checksum: 819e64301ea20bb40ad934ab65e7a7391d401a933f256a38e7e4fd981b00b831f0b4704fac07c62dd6a3eb3dede35daaf91a6055d1520c88a05de3c841ffbe52
languageName: node
linkType: hard
@@ -2112,7 +2105,7 @@ __metadata:
languageName: node
linkType: hard
-"@eslint-community/eslint-utils@npm:^4.2.0":
+"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0":
version: 4.4.0
resolution: "@eslint-community/eslint-utils@npm:4.4.0"
dependencies:
@@ -2123,10 +2116,10 @@ __metadata:
languageName: node
linkType: hard
-"@eslint-community/regexpp@npm:^4.4.0":
- version: 4.5.0
- resolution: "@eslint-community/regexpp@npm:4.5.0"
- checksum: fb2ec0131f2cf5ff69c870984eaad4de4fd35f2a2c0f7c09bcfafb5ca6ce14127e9d727546f1739aa38f9324a31faa52957c4be9bfb4b46ff2a5f6df2674a43b
+"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.0":
+ version: 4.10.0
+ resolution: "@eslint-community/regexpp@npm:4.10.0"
+ checksum: 8c36169c815fc5d726078e8c71a5b592957ee60d08c6470f9ce0187c8046af1a00afbda0a065cc40ff18d5d83f82aed9793c6818f7304a74a7488dc9f3ecbd42
languageName: node
linkType: hard
@@ -2854,65 +2847,50 @@ __metadata:
languageName: node
linkType: hard
-"@jest/console@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/console@npm:28.1.3"
+"@jest/console@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/console@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
- jest-message-util: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
+ jest-message-util: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
slash: "npm:^3.0.0"
- checksum: 82153eb24e61bd442bff350a7537d598e7c49097aabd9545b340582dcf1f17e5749baa342a67e564816a3a6ce746038b618ed9f66702140264bfa1e1d5cc9e5e
+ checksum: 4a80c750e8a31f344233cb9951dee9b77bf6b89377cb131f8b3cde07ff218f504370133a5963f6a786af4d2ce7f85642db206ff7a15f99fe58df4c38ac04899e
languageName: node
linkType: hard
-"@jest/console@npm:^29.1.2, @jest/console@npm:^29.5.0":
- version: 29.5.0
- resolution: "@jest/console@npm:29.5.0"
+"@jest/core@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/core@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^29.5.0"
- "@types/node": "npm:*"
- chalk: "npm:^4.0.0"
- jest-message-util: "npm:^29.5.0"
- jest-util: "npm:^29.5.0"
- slash: "npm:^3.0.0"
- checksum: 0971c3d6abbb6adfa0b4e88c41121bbd45d7df821f7a9f7b3f4fce86d25b237925db526b315f9791a24b29efd0028bb235f68d5b6cc343e83246a6e76b5724dc
- languageName: node
- linkType: hard
-
-"@jest/core@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/core@npm:28.1.3"
- dependencies:
- "@jest/console": "npm:^28.1.3"
- "@jest/reporters": "npm:^28.1.3"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/transform": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/console": "npm:^29.7.0"
+ "@jest/reporters": "npm:^29.7.0"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/transform": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
ansi-escapes: "npm:^4.2.1"
chalk: "npm:^4.0.0"
ci-info: "npm:^3.2.0"
exit: "npm:^0.1.2"
graceful-fs: "npm:^4.2.9"
- jest-changed-files: "npm:^28.1.3"
- jest-config: "npm:^28.1.3"
- jest-haste-map: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-regex-util: "npm:^28.0.2"
- jest-resolve: "npm:^28.1.3"
- jest-resolve-dependencies: "npm:^28.1.3"
- jest-runner: "npm:^28.1.3"
- jest-runtime: "npm:^28.1.3"
- jest-snapshot: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- jest-validate: "npm:^28.1.3"
- jest-watcher: "npm:^28.1.3"
+ jest-changed-files: "npm:^29.7.0"
+ jest-config: "npm:^29.7.0"
+ jest-haste-map: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-regex-util: "npm:^29.6.3"
+ jest-resolve: "npm:^29.7.0"
+ jest-resolve-dependencies: "npm:^29.7.0"
+ jest-runner: "npm:^29.7.0"
+ jest-runtime: "npm:^29.7.0"
+ jest-snapshot: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ jest-validate: "npm:^29.7.0"
+ jest-watcher: "npm:^29.7.0"
micromatch: "npm:^4.0.4"
- pretty-format: "npm:^28.1.3"
- rimraf: "npm:^3.0.0"
+ pretty-format: "npm:^29.7.0"
slash: "npm:^3.0.0"
strip-ansi: "npm:^6.0.0"
peerDependencies:
@@ -2920,212 +2898,86 @@ __metadata:
peerDependenciesMeta:
node-notifier:
optional: true
- checksum: 72b56c7591dd1ec325c40e9f60f8111e17d4a09c918b7e5882de58ed1c656d6d34f085dfbdb49f65e6ac95b49919976c7b07821663cbcccd7f3a55c29db542b9
+ checksum: ab6ac2e562d083faac7d8152ec1cc4eccc80f62e9579b69ed40aedf7211a6b2d57024a6cd53c4e35fd051c39a236e86257d1d99ebdb122291969a0a04563b51e
languageName: node
linkType: hard
-"@jest/core@npm:^29.1.2":
- version: 29.1.2
- resolution: "@jest/core@npm:29.1.2"
+"@jest/create-cache-key-function@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/create-cache-key-function@npm:29.7.0"
dependencies:
- "@jest/console": "npm:^29.1.2"
- "@jest/reporters": "npm:^29.1.2"
- "@jest/test-result": "npm:^29.1.2"
- "@jest/transform": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- "@types/node": "npm:*"
- ansi-escapes: "npm:^4.2.1"
- chalk: "npm:^4.0.0"
- ci-info: "npm:^3.2.0"
- exit: "npm:^0.1.2"
- graceful-fs: "npm:^4.2.9"
- jest-changed-files: "npm:^29.0.0"
- jest-config: "npm:^29.1.2"
- jest-haste-map: "npm:^29.1.2"
- jest-message-util: "npm:^29.1.2"
- jest-regex-util: "npm:^29.0.0"
- jest-resolve: "npm:^29.1.2"
- jest-resolve-dependencies: "npm:^29.1.2"
- jest-runner: "npm:^29.1.2"
- jest-runtime: "npm:^29.1.2"
- jest-snapshot: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- jest-validate: "npm:^29.1.2"
- jest-watcher: "npm:^29.1.2"
- micromatch: "npm:^4.0.4"
- pretty-format: "npm:^29.1.2"
- slash: "npm:^3.0.0"
- strip-ansi: "npm:^6.0.0"
- peerDependencies:
- node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
- peerDependenciesMeta:
- node-notifier:
- optional: true
- checksum: 4e64c95dd824973d529164766014a734b4ecb3d01ec9f31d56073f248a91c987ddbf1b4affdd0c88f89d9263f95e8bba5839b928b0029e1dc469426ac68d1155
+ "@jest/types": "npm:^29.6.3"
+ checksum: 061ef63b13ec8c8e5d08e4456f03b5cf8c7f9c1cab4fed8402e1479153cafce6eea80420e308ef62027abb7e29b825fcfa06551856bd021d98e92e381bf91723
languageName: node
linkType: hard
-"@jest/environment@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/environment@npm:28.1.3"
+"@jest/environment@npm:^29.1.2, @jest/environment@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/environment@npm:29.7.0"
dependencies:
- "@jest/fake-timers": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/fake-timers": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
- jest-mock: "npm:^28.1.3"
- checksum: 63a8efd099f8d5cd70398c7608d45fc91a5796b14d8f9f8c7fdb3a529e42004e3b60cf0c6e117cc88305d18ab7bb453f803a737e09293e9027a1e76ce835da57
+ jest-mock: "npm:^29.7.0"
+ checksum: 90b5844a9a9d8097f2cf107b1b5e57007c552f64315da8c1f51217eeb0a9664889d3f145cdf8acf23a84f4d8309a6675e27d5b059659a004db0ea9546d1c81a8
languageName: node
linkType: hard
-"@jest/environment@npm:^29.1.2":
- version: 29.1.2
- resolution: "@jest/environment@npm:29.1.2"
+"@jest/expect-utils@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/expect-utils@npm:29.7.0"
dependencies:
- "@jest/fake-timers": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- "@types/node": "npm:*"
- jest-mock: "npm:^29.1.2"
- checksum: aa0cf63c3257139eeaf4d0e0950c4b0bb28183dff3c85fd72ffa04354a1a5020f92c91a0b914e41bb8735c44c40f6664692180f6d640d054f53a0890f6d36756
+ jest-get-type: "npm:^29.6.3"
+ checksum: ef8d379778ef574a17bde2801a6f4469f8022a46a5f9e385191dc73bb1fc318996beaed4513fbd7055c2847227a1bed2469977821866534593a6e52a281499ee
languageName: node
linkType: hard
-"@jest/expect-utils@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/expect-utils@npm:28.1.3"
+"@jest/expect@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/expect@npm:29.7.0"
dependencies:
- jest-get-type: "npm:^28.0.2"
- checksum: f48e4c5b267438a565b6e4c00a06f2bd566dc65d8bb6114d57276ec1fa4f4cded548371e45caffe37c58e5cf3716dbec715c10cfacdae35c4c04b755d83fac96
+ expect: "npm:^29.7.0"
+ jest-snapshot: "npm:^29.7.0"
+ checksum: fea6c3317a8da5c840429d90bfe49d928e89c9e89fceee2149b93a11b7e9c73d2f6e4d7cdf647163da938fc4e2169e4490be6bae64952902bc7a701033fd4880
languageName: node
linkType: hard
-"@jest/expect-utils@npm:^29.6.2":
- version: 29.6.2
- resolution: "@jest/expect-utils@npm:29.6.2"
+"@jest/fake-timers@npm:^29.1.2, @jest/fake-timers@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/fake-timers@npm:29.7.0"
dependencies:
- jest-get-type: "npm:^29.4.3"
- checksum: 5ad8884dafa9320ff454f5898d5f79d540f3cbab86aa8b0260351081094bcbcd6bb056e4fc6aac1147f0ec3dda634b8b3491abc0035cdc28a71ff9ded8aad359
- languageName: node
- linkType: hard
-
-"@jest/expect@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/expect@npm:28.1.3"
- dependencies:
- expect: "npm:^28.1.3"
- jest-snapshot: "npm:^28.1.3"
- checksum: 31ea089e83a4c24f850043a97dfd777a352dd28a936819785f3d0de6e0bd537bfbfa8fd2df081db1adc68a6a55699e7d4ab3990d6a54e41753d86e5d2b66df2f
- languageName: node
- linkType: hard
-
-"@jest/expect@npm:^29.1.2":
- version: 29.6.2
- resolution: "@jest/expect@npm:29.6.2"
- dependencies:
- expect: "npm:^29.6.2"
- jest-snapshot: "npm:^29.6.2"
- checksum: 2beed96e3d24945a72aa2ae4843c99f4c631564569258fdde6746fae3efcbfbff96dbf92ed28d6531299bd12b2766075bacaaae88ebf84b99316e77151b43a9f
- languageName: node
- linkType: hard
-
-"@jest/fake-timers@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/fake-timers@npm:28.1.3"
- dependencies:
- "@jest/types": "npm:^28.1.3"
- "@sinonjs/fake-timers": "npm:^9.1.2"
+ "@jest/types": "npm:^29.6.3"
+ "@sinonjs/fake-timers": "npm:^10.0.2"
"@types/node": "npm:*"
- jest-message-util: "npm:^28.1.3"
- jest-mock: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- checksum: 4002208f6637adc374175c97e845a19783f58874e9503fb956b801061ba1869a218964cf4631e1ac348e06e1667e982ceb94734db63ccfafdf37508f6b59be17
+ jest-message-util: "npm:^29.7.0"
+ jest-mock: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ checksum: 9b394e04ffc46f91725ecfdff34c4e043eb7a16e1d78964094c9db3fde0b1c8803e45943a980e8c740d0a3d45661906de1416ca5891a538b0660481a3a828c27
languageName: node
linkType: hard
-"@jest/fake-timers@npm:^29.1.2":
- version: 29.1.2
- resolution: "@jest/fake-timers@npm:29.1.2"
+"@jest/globals@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/globals@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^29.1.2"
- "@sinonjs/fake-timers": "npm:^9.1.2"
- "@types/node": "npm:*"
- jest-message-util: "npm:^29.1.2"
- jest-mock: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- checksum: cfebaa142fed5357f7183a82bb6da4393dbc972087f32583694f4659253f8e8956939acaea95583fd165f7782f93776f85755e891ebee757522e9761457bf8f5
- languageName: node
- linkType: hard
-
-"@jest/globals@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/globals@npm:28.1.3"
- dependencies:
- "@jest/environment": "npm:^28.1.3"
- "@jest/expect": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- checksum: 3504bb23de629d466c6f2b6b75d2e1c1b10caccbbcfb7eaa82d22cc37711c8e364c243929581184846605c023b475ea6c42c2e3ea5994429a988d8d527af32cd
- languageName: node
- linkType: hard
-
-"@jest/globals@npm:^29.1.2":
- version: 29.1.2
- resolution: "@jest/globals@npm:29.1.2"
- dependencies:
- "@jest/environment": "npm:^29.1.2"
- "@jest/expect": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- jest-mock: "npm:^29.1.2"
- checksum: 4baffd630ed6b4748d980bb57142dbe624b59f139c9e278dd1ee0916e574c5322e2aeb0c44059d70c67d594072024811c6577e736bfffddc1f6b8696d3188d4e
+ "@jest/environment": "npm:^29.7.0"
+ "@jest/expect": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
+ jest-mock: "npm:^29.7.0"
+ checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123
languageName: node
linkType: hard
-"@jest/reporters@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/reporters@npm:28.1.3"
+"@jest/reporters@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/reporters@npm:29.7.0"
dependencies:
"@bcoe/v8-coverage": "npm:^0.2.3"
- "@jest/console": "npm:^28.1.3"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/transform": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- "@jridgewell/trace-mapping": "npm:^0.3.13"
- "@types/node": "npm:*"
- chalk: "npm:^4.0.0"
- collect-v8-coverage: "npm:^1.0.0"
- exit: "npm:^0.1.2"
- glob: "npm:^7.1.3"
- graceful-fs: "npm:^4.2.9"
- istanbul-lib-coverage: "npm:^3.0.0"
- istanbul-lib-instrument: "npm:^5.1.0"
- istanbul-lib-report: "npm:^3.0.0"
- istanbul-lib-source-maps: "npm:^4.0.0"
- istanbul-reports: "npm:^3.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- jest-worker: "npm:^28.1.3"
- slash: "npm:^3.0.0"
- string-length: "npm:^4.0.1"
- strip-ansi: "npm:^6.0.0"
- terminal-link: "npm:^2.0.0"
- v8-to-istanbul: "npm:^9.0.1"
- peerDependencies:
- node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
- peerDependenciesMeta:
- node-notifier:
- optional: true
- checksum: bdce58bf1cf1fc0f7fb0c2ae02b5a9a1da32da83ee4697b2b23b8a5b0ac056af55dac07dcf7e869f963943e935da3bd26a788c478b6d52064c77320530d95a89
- languageName: node
- linkType: hard
-
-"@jest/reporters@npm:^29.1.2":
- version: 29.5.0
- resolution: "@jest/reporters@npm:29.5.0"
- dependencies:
- "@bcoe/v8-coverage": "npm:^0.2.3"
- "@jest/console": "npm:^29.5.0"
- "@jest/test-result": "npm:^29.5.0"
- "@jest/transform": "npm:^29.5.0"
- "@jest/types": "npm:^29.5.0"
- "@jridgewell/trace-mapping": "npm:^0.3.15"
+ "@jest/console": "npm:^29.7.0"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/transform": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
+ "@jridgewell/trace-mapping": "npm:^0.3.18"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
collect-v8-coverage: "npm:^1.0.0"
@@ -3133,13 +2985,13 @@ __metadata:
glob: "npm:^7.1.3"
graceful-fs: "npm:^4.2.9"
istanbul-lib-coverage: "npm:^3.0.0"
- istanbul-lib-instrument: "npm:^5.1.0"
+ istanbul-lib-instrument: "npm:^6.0.0"
istanbul-lib-report: "npm:^3.0.0"
istanbul-lib-source-maps: "npm:^4.0.0"
istanbul-reports: "npm:^3.1.3"
- jest-message-util: "npm:^29.5.0"
- jest-util: "npm:^29.5.0"
- jest-worker: "npm:^29.5.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ jest-worker: "npm:^29.7.0"
slash: "npm:^3.0.0"
string-length: "npm:^4.0.1"
strip-ansi: "npm:^6.0.0"
@@ -3149,141 +3001,74 @@ __metadata:
peerDependenciesMeta:
node-notifier:
optional: true
- checksum: bf9a13434e0d623a66de80b835fec37227fbef0de7cf73545d8a8a3c80b2d96a8ffd3d077378da0a0c7565772ca6cd3641a5d6c282d9490400d2ce39dbf47525
- languageName: node
- linkType: hard
-
-"@jest/schemas@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/schemas@npm:28.1.3"
- dependencies:
- "@sinclair/typebox": "npm:^0.24.1"
- checksum: 3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de
+ checksum: a17d1644b26dea14445cedd45567f4ba7834f980be2ef74447204e14238f121b50d8b858fde648083d2cd8f305f81ba434ba49e37a5f4237a6f2a61180cc73dc
languageName: node
linkType: hard
-"@jest/schemas@npm:^29.6.0":
- version: 29.6.0
- resolution: "@jest/schemas@npm:29.6.0"
+"@jest/schemas@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "@jest/schemas@npm:29.6.3"
dependencies:
"@sinclair/typebox": "npm:^0.27.8"
- checksum: c00511c69cf89138a7d974404d3a5060af375b5a52b9c87215d91873129b382ca11c1ff25bd6d605951404bb381ddce5f8091004a61e76457da35db1f5c51365
- languageName: node
- linkType: hard
-
-"@jest/source-map@npm:^28.1.2":
- version: 28.1.2
- resolution: "@jest/source-map@npm:28.1.2"
- dependencies:
- "@jridgewell/trace-mapping": "npm:^0.3.13"
- callsites: "npm:^3.0.0"
- graceful-fs: "npm:^4.2.9"
- checksum: b82a5c2e93d35d86779c61a02ccb967d1b5cd2e9dd67d26d8add44958637cbbb99daeeb8129c7653389cb440dc2a2f5ae4d2183dc453c67669ff98938b775a3a
+ checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93
languageName: node
linkType: hard
-"@jest/source-map@npm:^29.0.0":
- version: 29.0.0
- resolution: "@jest/source-map@npm:29.0.0"
+"@jest/source-map@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "@jest/source-map@npm:29.6.3"
dependencies:
- "@jridgewell/trace-mapping": "npm:^0.3.15"
+ "@jridgewell/trace-mapping": "npm:^0.3.18"
callsites: "npm:^3.0.0"
graceful-fs: "npm:^4.2.9"
- checksum: dd97bc5826cf68d6eb5565383816332f800476232fd12800bd027a259cbf3ef216f1633405f3ad0861dde3b12a7886301798c078b334f6d3012044d43abcf4f6
+ checksum: bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb
languageName: node
linkType: hard
-"@jest/test-result@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/test-result@npm:28.1.3"
+"@jest/test-result@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/test-result@npm:29.7.0"
dependencies:
- "@jest/console": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/console": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/istanbul-lib-coverage": "npm:^2.0.0"
collect-v8-coverage: "npm:^1.0.0"
- checksum: d343f08e6e4971e8132540014711c5d29887651b036f03db8c7e9d6509fe9801316f0a6a393cd0af0431c50e6d1c1d310957f06b6cc20c08cab2e67b66a00c88
+ checksum: c073ab7dfe3c562bff2b8fee6cc724ccc20aa96bcd8ab48ccb2aa309b4c0c1923a9e703cea386bd6ae9b71133e92810475bb9c7c22328fc63f797ad3324ed189
languageName: node
linkType: hard
-"@jest/test-result@npm:^29.1.2, @jest/test-result@npm:^29.3.1, @jest/test-result@npm:^29.5.0":
- version: 29.5.0
- resolution: "@jest/test-result@npm:29.5.0"
+"@jest/test-sequencer@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/test-sequencer@npm:29.7.0"
dependencies:
- "@jest/console": "npm:^29.5.0"
- "@jest/types": "npm:^29.5.0"
- "@types/istanbul-lib-coverage": "npm:^2.0.0"
- collect-v8-coverage: "npm:^1.0.0"
- checksum: e41ab6137b26dba4d08441f3c921c8c9f4543bddd23072e1dbb54770584ac118f957fc6da4bf94bc5127161bee8e1ea6983b4e92249e47604163b10347d373ce
- languageName: node
- linkType: hard
-
-"@jest/test-sequencer@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/test-sequencer@npm:28.1.3"
- dependencies:
- "@jest/test-result": "npm:^28.1.3"
+ "@jest/test-result": "npm:^29.7.0"
graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^28.1.3"
+ jest-haste-map: "npm:^29.7.0"
slash: "npm:^3.0.0"
- checksum: a2f05475c39a8e3e446a0f98c6830aa2492daffe8286db58c95e1870479ed4c2a74e2e51fac1d8b2958858aeb194331145c217d04482fb9312ba1a9e7dded171
+ checksum: 4420c26a0baa7035c5419b0892ff8ffe9a41b1583ec54a10db3037cd46a7e29dd3d7202f8aa9d376e9e53be5f8b1bc0d16e1de6880a6d319b033b01dc4c8f639
languageName: node
linkType: hard
-"@jest/test-sequencer@npm:^29.1.2":
- version: 29.1.2
- resolution: "@jest/test-sequencer@npm:29.1.2"
- dependencies:
- "@jest/test-result": "npm:^29.1.2"
- graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^29.1.2"
- slash: "npm:^3.0.0"
- checksum: 33f5db50a5d550ac7cb453de0bfac11f44ace48903cb4be6b0507d446a7ce0ae96e758046f13f72ab6ad6eeb7a409b9985ada050badadee67187b33b66b2a7f5
- languageName: node
- linkType: hard
-
-"@jest/transform@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/transform@npm:28.1.3"
+"@jest/transform@npm:^29.3.1, @jest/transform@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "@jest/transform@npm:29.7.0"
dependencies:
"@babel/core": "npm:^7.11.6"
- "@jest/types": "npm:^28.1.3"
- "@jridgewell/trace-mapping": "npm:^0.3.13"
- babel-plugin-istanbul: "npm:^6.1.1"
- chalk: "npm:^4.0.0"
- convert-source-map: "npm:^1.4.0"
- fast-json-stable-stringify: "npm:^2.0.0"
- graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^28.1.3"
- jest-regex-util: "npm:^28.0.2"
- jest-util: "npm:^28.1.3"
- micromatch: "npm:^4.0.4"
- pirates: "npm:^4.0.4"
- slash: "npm:^3.0.0"
- write-file-atomic: "npm:^4.0.1"
- checksum: 89bc17ca22d5e81eb35e9549beaa5778da0209c12c108552322b72fa7b41a387d119168dea28fd9415f16883fc6dd7a811690654ebb958375e70158b4d0e2965
- languageName: node
- linkType: hard
-
-"@jest/transform@npm:^29.1.2, @jest/transform@npm:^29.3.1, @jest/transform@npm:^29.5.0, @jest/transform@npm:^29.6.2":
- version: 29.6.2
- resolution: "@jest/transform@npm:29.6.2"
- dependencies:
- "@babel/core": "npm:^7.11.6"
- "@jest/types": "npm:^29.6.1"
+ "@jest/types": "npm:^29.6.3"
"@jridgewell/trace-mapping": "npm:^0.3.18"
babel-plugin-istanbul: "npm:^6.1.1"
chalk: "npm:^4.0.0"
convert-source-map: "npm:^2.0.0"
fast-json-stable-stringify: "npm:^2.1.0"
graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^29.6.2"
- jest-regex-util: "npm:^29.4.3"
- jest-util: "npm:^29.6.2"
+ jest-haste-map: "npm:^29.7.0"
+ jest-regex-util: "npm:^29.6.3"
+ jest-util: "npm:^29.7.0"
micromatch: "npm:^4.0.4"
pirates: "npm:^4.0.4"
slash: "npm:^3.0.0"
write-file-atomic: "npm:^4.0.2"
- checksum: ab1759672e460bdcc2950ab6fcc2509b40c87d022164492363553ebb5efb0ce67a1721c0aaf5dd00370d20771cb234360bd03635d72354b0fd3e959355becbd7
+ checksum: 30f42293545ab037d5799c81d3e12515790bb58513d37f788ce32d53326d0d72ebf5b40f989e6896739aa50a5f77be44686e510966370d58511d5ad2637c68c1
languageName: node
linkType: hard
@@ -3299,31 +3084,17 @@ __metadata:
languageName: node
linkType: hard
-"@jest/types@npm:^28.1.3":
- version: 28.1.3
- resolution: "@jest/types@npm:28.1.3"
+"@jest/types@npm:^29.1.2, @jest/types@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "@jest/types@npm:29.6.3"
dependencies:
- "@jest/schemas": "npm:^28.1.3"
+ "@jest/schemas": "npm:^29.6.3"
"@types/istanbul-lib-coverage": "npm:^2.0.0"
"@types/istanbul-reports": "npm:^3.0.0"
"@types/node": "npm:*"
"@types/yargs": "npm:^17.0.8"
chalk: "npm:^4.0.0"
- checksum: a90e636df760799b6c3d91e34e539e701ea803e80312257e674e345a3c23a7c892df7a301afbc7883ec1d623daf3ba266cde57c5965e0692e5f1e61915d3524b
- languageName: node
- linkType: hard
-
-"@jest/types@npm:^29.1.2, @jest/types@npm:^29.3.1, @jest/types@npm:^29.5.0, @jest/types@npm:^29.6.1":
- version: 29.6.1
- resolution: "@jest/types@npm:29.6.1"
- dependencies:
- "@jest/schemas": "npm:^29.6.0"
- "@types/istanbul-lib-coverage": "npm:^2.0.0"
- "@types/istanbul-reports": "npm:^3.0.0"
- "@types/node": "npm:*"
- "@types/yargs": "npm:^17.0.8"
- chalk: "npm:^4.0.0"
- checksum: f6264fb0fc60efcb95adf3c4b30be6433aae75769b4f90d09de35fb19c65f7184d6c227a75f5b9e0054368d4fbf5cc4b397f9756d9a59eee25f3247d2e020f93
+ checksum: f74bf512fd09bbe2433a2ad460b04668b7075235eea9a0c77d6a42222c10a79b9747dc2b2a623f140ed40d6865a2ed8f538f3cbb75169120ea863f29a7ed76cd
languageName: node
linkType: hard
@@ -3369,7 +3140,7 @@ __metadata:
languageName: node
linkType: hard
-"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.13, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9":
+"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9":
version: 0.3.19
resolution: "@jridgewell/trace-mapping@npm:0.3.19"
dependencies:
@@ -3437,6 +3208,22 @@ __metadata:
languageName: node
linkType: hard
+"@kwsites/file-exists@npm:^1.1.1":
+ version: 1.1.1
+ resolution: "@kwsites/file-exists@npm:1.1.1"
+ dependencies:
+ debug: "npm:^4.1.1"
+ checksum: 4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe
+ languageName: node
+ linkType: hard
+
+"@kwsites/promise-deferred@npm:^1.1.1":
+ version: 1.1.1
+ resolution: "@kwsites/promise-deferred@npm:1.1.1"
+ checksum: 07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629
+ languageName: node
+ linkType: hard
+
"@lavamoat/aa@npm:^4.0.1":
version: 4.0.1
resolution: "@lavamoat/aa@npm:4.0.1"
@@ -3463,6 +3250,25 @@ __metadata:
languageName: node
linkType: hard
+"@lavamoat/lavadome-core@npm:0.0.10, @lavamoat/lavadome-core@npm:^0.0.10":
+ version: 0.0.10
+ resolution: "@lavamoat/lavadome-core@npm:0.0.10"
+ checksum: 79011976d5643112b3930210d56f933a575102ff200338c1436c102f5f0f3f6efea9cd44ef673f5859e0832980b83ad7a2162d95db299f5877e8a408cf16bd6c
+ languageName: node
+ linkType: hard
+
+"@lavamoat/lavadome-react@npm:0.0.10":
+ version: 0.0.10
+ resolution: "@lavamoat/lavadome-react@npm:0.0.10"
+ dependencies:
+ "@lavamoat/lavadome-core": "npm:^0.0.10"
+ peerDependencies:
+ react: ^16.12.0
+ react-dom: ^16.12.0
+ checksum: cac64b7bd75d4796bffd13e529f864c41e2e1cfde281ad68ca500dc13af5d0bef5293abdc45a95e4e42251bc848d1e0beda907450672acc7fe69c323ca9d1c4d
+ languageName: node
+ linkType: hard
+
"@lavamoat/lavapack@npm:^6.0.2":
version: 6.0.2
resolution: "@lavamoat/lavapack@npm:6.0.2"
@@ -3773,41 +3579,45 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/accounts-controller@npm:5.0.0":
- version: 5.0.0
- resolution: "@metamask/accounts-controller@npm:5.0.0"
+"@metamask/accounts-controller@npm:10.0.0":
+ version: 10.0.0
+ resolution: "@metamask/accounts-controller@npm:10.0.0"
dependencies:
- "@metamask/base-controller": "npm:^3.2.3"
- "@metamask/eth-snap-keyring": "npm:^2.0.0"
- "@metamask/keyring-api": "npm:^1.1.0"
- "@metamask/snaps-utils": "npm:^3.2.0"
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/eth-snap-keyring": "npm:^2.1.1"
+ "@metamask/keyring-api": "npm:^3.0.0"
+ "@metamask/snaps-sdk": "npm:^1.3.2"
+ "@metamask/snaps-utils": "npm:^5.1.2"
+ "@metamask/utils": "npm:^8.3.0"
deepmerge: "npm:^4.2.2"
ethereumjs-util: "npm:^7.0.10"
immer: "npm:^9.0.6"
uuid: "npm:^8.3.2"
peerDependencies:
- "@metamask/keyring-controller": ^9.0.0
- checksum: 7f1759a89603ae6072cd9a475d61d1c58300ebd32f9a42111329da0403cce41f991c85cfd52811171ffbfc762b94f8470d15885c7b79620288c39e146fb0ae4d
+ "@metamask/keyring-controller": ^12.2.0
+ "@metamask/snaps-controllers": ^4.0.0
+ checksum: 67bde84bd7d4215635ac1e5121fefca43a111743e922d6b8c050b136571a7887119bd8d1c08e41c5806292260309b27853fe959ff593731434bcbdbb7a22b076
languageName: node
linkType: hard
-"@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A5.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-5.0.0-f877105fa0.patch":
- version: 5.0.0
- resolution: "@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A5.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-5.0.0-f877105fa0.patch::version=5.0.0&hash=aa3146"
+"@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A10.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-10.0.0-247993ca9a.patch":
+ version: 10.0.0
+ resolution: "@metamask/accounts-controller@patch:@metamask/accounts-controller@npm%3A10.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-10.0.0-247993ca9a.patch::version=10.0.0&hash=0a18f3"
dependencies:
- "@metamask/base-controller": "npm:^3.2.3"
- "@metamask/eth-snap-keyring": "npm:^2.0.0"
- "@metamask/keyring-api": "npm:^1.1.0"
- "@metamask/snaps-utils": "npm:^3.2.0"
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/eth-snap-keyring": "npm:^2.1.1"
+ "@metamask/keyring-api": "npm:^3.0.0"
+ "@metamask/snaps-sdk": "npm:^1.3.2"
+ "@metamask/snaps-utils": "npm:^5.1.2"
+ "@metamask/utils": "npm:^8.3.0"
deepmerge: "npm:^4.2.2"
ethereumjs-util: "npm:^7.0.10"
immer: "npm:^9.0.6"
uuid: "npm:^8.3.2"
peerDependencies:
- "@metamask/keyring-controller": ^9.0.0
- checksum: 83d027fdc604cb13242b91fe87b7408986d06ae9de8015797961ad744d702052220551817292ee2f2f03be430d2819b038984e841dac420d410fb8f5bfdc3474
+ "@metamask/keyring-controller": ^12.2.0
+ "@metamask/snaps-controllers": ^4.0.0
+ checksum: 809c1a3bfe0982b6113c7c76c43576fc9a454c66ec5403b839e10468ec753d742027cb7674045c9005de32ca7822dcd2bc0a19f68be37e1184486652c7befba3
languageName: node
linkType: hard
@@ -3893,7 +3703,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/base-controller@npm:^3.0.0, @metamask/base-controller@npm:^3.2.0, @metamask/base-controller@npm:^3.2.1, @metamask/base-controller@npm:^3.2.3":
+"@metamask/base-controller@npm:^3.0.0, @metamask/base-controller@npm:^3.2.1, @metamask/base-controller@npm:^3.2.3":
version: 3.2.3
resolution: "@metamask/base-controller@npm:3.2.3"
dependencies:
@@ -3903,13 +3713,13 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/base-controller@npm:^4.0.0, @metamask/base-controller@npm:^4.0.1, @metamask/base-controller@npm:^4.1.0":
- version: 4.1.0
- resolution: "@metamask/base-controller@npm:4.1.0"
+"@metamask/base-controller@npm:^4.0.0, @metamask/base-controller@npm:^4.0.1, @metamask/base-controller@npm:^4.1.0, @metamask/base-controller@npm:^4.1.1":
+ version: 4.1.1
+ resolution: "@metamask/base-controller@npm:4.1.1"
dependencies:
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/utils": "npm:^8.3.0"
immer: "npm:^9.0.6"
- checksum: a30a404429a2fe7f0e8a291e0f996e81489ca34230d679462a6d8dccaf066b9594fc8935f2fa187cd4f7ab31509d18ce58f8985ae3dea72e4c1f3b61fea19b40
+ checksum: c3481179af62ae3ec16794f8eca0b54dd4ce9abf39278ceb766fd0d295b66399c5d58f605fe1ba24d296d52bb0e1180fb99e3e6e9db7b8a4115a02b15653c447
languageName: node
linkType: hard
@@ -3970,25 +3780,25 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/controller-utils@npm:^8.0.1":
- version: 8.0.1
- resolution: "@metamask/controller-utils@npm:8.0.1"
+"@metamask/controller-utils@npm:^8.0.1, @metamask/controller-utils@npm:^8.0.2":
+ version: 8.0.2
+ resolution: "@metamask/controller-utils@npm:8.0.2"
dependencies:
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/ethjs-unit": "npm:^0.2.1"
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/utils": "npm:^8.3.0"
"@spruceid/siwe-parser": "npm:1.1.3"
eth-ens-namehash: "npm:^2.0.8"
ethereumjs-util: "npm:^7.0.10"
fast-deep-equal: "npm:^3.1.3"
- checksum: c3f125d9a33a003e369b0312af4634f6205729ce718046a1f0add9e135a0602b405b948ddbd4caf700ba21c724c8ac9936f3e96630fb9286c9e0a312ef552e62
+ checksum: 6a8099b883c51b47494678998fb14291cd0ea9904823b8e3a8cd1621dfc321b59b071e0f264225901177e4826499c32243d5b18388c521bbef351ab87a9d332b
languageName: node
linkType: hard
-"@metamask/design-tokens@npm:^1.12.0":
- version: 1.12.0
- resolution: "@metamask/design-tokens@npm:1.12.0"
- checksum: bc1f5f4c3d43455a10e546bed951de6797a134557adb654cc61f39c4adc22065aedf12f6891c138e207d4ecd541914f95a9cc12fa201055bf65002f54207bc58
+"@metamask/design-tokens@npm:^1.12.0, @metamask/design-tokens@npm:^1.13.0":
+ version: 1.13.0
+ resolution: "@metamask/design-tokens@npm:1.13.0"
+ checksum: a76d10ad3ad6f1f30bf3b8e749e70c71587fd543fafd355b6185fb191994547acb63408c6d5ac4a53c4aa1f9e4022cd63ad83bd98cbac79f21f5bc7df15e63ab
languageName: node
linkType: hard
@@ -4113,14 +3923,14 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-json-rpc-provider@npm:^2.1.0, @metamask/eth-json-rpc-provider@npm:^2.2.0, @metamask/eth-json-rpc-provider@npm:^2.3.1":
- version: 2.3.1
- resolution: "@metamask/eth-json-rpc-provider@npm:2.3.1"
+"@metamask/eth-json-rpc-provider@npm:^2.1.0, @metamask/eth-json-rpc-provider@npm:^2.2.0, @metamask/eth-json-rpc-provider@npm:^2.3.2":
+ version: 2.3.2
+ resolution: "@metamask/eth-json-rpc-provider@npm:2.3.2"
dependencies:
- "@metamask/json-rpc-engine": "npm:^7.3.1"
+ "@metamask/json-rpc-engine": "npm:^7.3.2"
"@metamask/safe-event-emitter": "npm:^3.0.0"
- "@metamask/utils": "npm:^8.2.0"
- checksum: fa0a987eb7e0dcff495489e95c358f6786a4a793a42ac900bb022027d27e6534ded743092e79a2191b9b4d760f418f39f6cfb99a5a5a0085f252016579be6865
+ "@metamask/utils": "npm:^8.3.0"
+ checksum: e6731271aad3b972d85b9230c26d35a9b88722f3bd3024675ad2f568e634e9fdfef4717ef2892f3cc512d381cf17a4e20dbd5eb808ced765082bea3379ad6ddc
languageName: node
linkType: hard
@@ -4172,7 +3982,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-sig-util@npm:^7.0.0":
+"@metamask/eth-sig-util@npm:^7.0.0, @metamask/eth-sig-util@npm:^7.0.1":
version: 7.0.1
resolution: "@metamask/eth-sig-util@npm:7.0.1"
dependencies:
@@ -4199,7 +4009,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-snap-keyring@npm:^2.0.0, @metamask/eth-snap-keyring@npm:^2.1.1":
+"@metamask/eth-snap-keyring@npm:^2.1.1":
version: 2.1.1
resolution: "@metamask/eth-snap-keyring@npm:2.1.1"
dependencies:
@@ -4382,6 +4192,26 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/gas-fee-controller@npm:^13.0.0":
+ version: 13.0.0
+ resolution: "@metamask/gas-fee-controller@npm:13.0.0"
+ dependencies:
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/controller-utils": "npm:^8.0.2"
+ "@metamask/eth-query": "npm:^4.0.0"
+ "@metamask/ethjs-unit": "npm:^0.2.1"
+ "@metamask/network-controller": "npm:^17.2.0"
+ "@metamask/polling-controller": "npm:^5.0.0"
+ "@metamask/utils": "npm:^8.3.0"
+ "@types/uuid": "npm:^8.3.0"
+ ethereumjs-util: "npm:^7.0.10"
+ uuid: "npm:^8.3.2"
+ peerDependencies:
+ "@metamask/network-controller": ^17.2.0
+ checksum: 8edbe4412a1bf80eb3a3c6305c35b45ee38f9262a4dd3b38c30d2e81e0f84d2f8ee261e3548fb25a049f53cf76ccf8238c4aca31ec6cd0c5b46ba9c58a705bc8
+ languageName: node
+ linkType: hard
+
"@metamask/jazzicon@npm:^2.0.0":
version: 2.0.0
resolution: "@metamask/jazzicon@npm:2.0.0"
@@ -4392,14 +4222,14 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/json-rpc-engine@npm:^7.1.1, @metamask/json-rpc-engine@npm:^7.2.0, @metamask/json-rpc-engine@npm:^7.3.0, @metamask/json-rpc-engine@npm:^7.3.1":
- version: 7.3.1
- resolution: "@metamask/json-rpc-engine@npm:7.3.1"
+"@metamask/json-rpc-engine@npm:^7.1.1, @metamask/json-rpc-engine@npm:^7.2.0, @metamask/json-rpc-engine@npm:^7.3.1, @metamask/json-rpc-engine@npm:^7.3.2":
+ version: 7.3.2
+ resolution: "@metamask/json-rpc-engine@npm:7.3.2"
dependencies:
"@metamask/rpc-errors": "npm:^6.1.0"
"@metamask/safe-event-emitter": "npm:^3.0.0"
- "@metamask/utils": "npm:^8.2.0"
- checksum: 3988ec9229964c8c3c9172ad8ef36bea2f20e63d0dd720431db89a0031b7692c5ebaa2c53afe9896a823b334f4d5eb718e48a5db00477fe8b7643d332ae3010d
+ "@metamask/utils": "npm:^8.3.0"
+ checksum: d90e5fdf88461aa90af41ba0304729200afa8226ab8b73db348704a1f545e416c49281a1dfd58591dde769e1ab263080b26d5a0ab1be8362398639dc2d6354de
languageName: node
linkType: hard
@@ -4417,35 +4247,33 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/keyring-api@npm:^1.0.0, @metamask/keyring-api@npm:^1.1.0":
- version: 1.1.0
- resolution: "@metamask/keyring-api@npm:1.1.0"
+"@metamask/keyring-api@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "@metamask/keyring-api@npm:2.0.0"
dependencies:
- "@metamask/providers": "npm:^13.0.0"
- "@metamask/snaps-controllers": "npm:^3.1.0"
- "@metamask/snaps-rpc-methods": "npm:^3.1.0"
- "@metamask/snaps-utils": "npm:^3.0.0"
+ "@metamask/providers": "npm:^14.0.1"
+ "@metamask/snaps-controllers": "npm:^3.4.1"
+ "@metamask/snaps-sdk": "npm:^1.2.0"
+ "@metamask/snaps-utils": "npm:^5.0.0"
"@metamask/utils": "npm:^8.1.0"
"@types/uuid": "npm:^9.0.1"
superstruct: "npm:^1.0.3"
uuid: "npm:^9.0.0"
- checksum: a14791d40d1f77c734e434de37f837f25346614d93fb68b9f1235a5fca89f33dd5becfbbedff2ca531bf5c3191074cede53950978944b6f5b9dc36175ee08c01
+ checksum: 65dcca4d7f94102fafbccbb3ee79647f94f92985e8e3dab795fde5ee563fd3ff050ec59ee16c0276d06bb7d474a2281c504d2dc7cac60df3b2bfc918aa17615f
languageName: node
linkType: hard
-"@metamask/keyring-api@npm:^2.0.0":
- version: 2.0.0
- resolution: "@metamask/keyring-api@npm:2.0.0"
+"@metamask/keyring-api@npm:^3.0.0":
+ version: 3.0.0
+ resolution: "@metamask/keyring-api@npm:3.0.0"
dependencies:
"@metamask/providers": "npm:^14.0.1"
- "@metamask/snaps-controllers": "npm:^3.4.1"
- "@metamask/snaps-sdk": "npm:^1.2.0"
- "@metamask/snaps-utils": "npm:^5.0.0"
+ "@metamask/snaps-sdk": "npm:^1.3.2"
"@metamask/utils": "npm:^8.1.0"
"@types/uuid": "npm:^9.0.1"
superstruct: "npm:^1.0.3"
uuid: "npm:^9.0.0"
- checksum: 65dcca4d7f94102fafbccbb3ee79647f94f92985e8e3dab795fde5ee563fd3ff050ec59ee16c0276d06bb7d474a2281c504d2dc7cac60df3b2bfc918aa17615f
+ checksum: ca07392e2cef1f5f7056e73c7a5d0a4092234b3d794aa3bca1ce3a1df0dc40832ec3fc0026965b54c07aec0ee175267de365033b028909484bc6d9fe4fb4c329
languageName: node
linkType: hard
@@ -4511,18 +4339,18 @@ __metadata:
linkType: hard
"@metamask/message-manager@npm:^7.3.0, @metamask/message-manager@npm:^7.3.5":
- version: 7.3.5
- resolution: "@metamask/message-manager@npm:7.3.5"
+ version: 7.3.8
+ resolution: "@metamask/message-manager@npm:7.3.8"
dependencies:
- "@metamask/base-controller": "npm:^3.2.3"
- "@metamask/controller-utils": "npm:^5.0.2"
- "@metamask/eth-sig-util": "npm:^7.0.0"
- "@metamask/utils": "npm:^8.1.0"
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/controller-utils": "npm:^8.0.2"
+ "@metamask/eth-sig-util": "npm:^7.0.1"
+ "@metamask/utils": "npm:^8.3.0"
"@types/uuid": "npm:^8.3.0"
ethereumjs-util: "npm:^7.0.10"
jsonschema: "npm:^1.2.4"
uuid: "npm:^8.3.2"
- checksum: 6ee9214847d24228dcb2efe25ef1f40c82dd021780ff3e4bcc03d3703eb03ffdbc92f4a85e8276a499215dec994a4aa6bc6e0ab8a1cdfffcf36ba54f604dfd2a
+ checksum: 0aa94422751e405b542af1f2b6a6f89aa61c991a9a9312b2a4d5a2bbb007aae84bda2dae2e084206003bbfe75f06bd170820d88c9a39492a0f8f0e9edcb4afe3
languageName: node
linkType: hard
@@ -4533,14 +4361,14 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/name-controller@npm:^4.0.0":
- version: 4.0.1
- resolution: "@metamask/name-controller@npm:4.0.1"
+"@metamask/name-controller@npm:^4.2.0":
+ version: 4.2.0
+ resolution: "@metamask/name-controller@npm:4.2.0"
dependencies:
- "@metamask/base-controller": "npm:^4.0.1"
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/base-controller": "npm:^4.1.0"
+ "@metamask/utils": "npm:^8.3.0"
async-mutex: "npm:^0.2.6"
- checksum: 177e5b48e9e6c62579fb314d2db5e47c9bfb68035eb0d2e75431f765f98cdcaef4ade946f77769ddf9f0d45a483d44028dde7224ead2e427d2878d2a4a24e421
+ checksum: 79a8d1281a85fabc817c47a8d1eb04708d69198db732c1eb17bd61718e476aee75734a8e1ae65253b642feb6d9c96082f47fb30ff3fa9aa8b657d3d2bc217b6a
languageName: node
linkType: hard
@@ -4566,25 +4394,25 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/network-controller@npm:^17.1.0":
- version: 17.1.0
- resolution: "@metamask/network-controller@npm:17.1.0"
+"@metamask/network-controller@npm:^17.0.0, @metamask/network-controller@npm:^17.1.0, @metamask/network-controller@npm:^17.2.0":
+ version: 17.2.0
+ resolution: "@metamask/network-controller@npm:17.2.0"
dependencies:
- "@metamask/base-controller": "npm:^4.0.1"
- "@metamask/controller-utils": "npm:^8.0.1"
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/controller-utils": "npm:^8.0.2"
"@metamask/eth-json-rpc-infura": "npm:^9.0.0"
"@metamask/eth-json-rpc-middleware": "npm:^12.0.1"
- "@metamask/eth-json-rpc-provider": "npm:^2.3.1"
+ "@metamask/eth-json-rpc-provider": "npm:^2.3.2"
"@metamask/eth-query": "npm:^4.0.0"
- "@metamask/json-rpc-engine": "npm:^7.3.1"
+ "@metamask/json-rpc-engine": "npm:^7.3.2"
"@metamask/rpc-errors": "npm:^6.1.0"
- "@metamask/swappable-obj-proxy": "npm:^2.1.0"
- "@metamask/utils": "npm:^8.2.0"
+ "@metamask/swappable-obj-proxy": "npm:^2.2.0"
+ "@metamask/utils": "npm:^8.3.0"
async-mutex: "npm:^0.2.6"
eth-block-tracker: "npm:^8.0.0"
immer: "npm:^9.0.6"
uuid: "npm:^8.3.2"
- checksum: 57408c06a307cfeb604abb4e2e4e04d3985efab92562f3bec618aafcd088aea67a8d9b039834a27fd3d1b72d4a0f0908fee01698f918947c73f052af534bb435
+ checksum: 0fa7cf92cdcde5dba68e4d35d0f23c060d43f8da8062922aa2b468a9ab7bbd51a600b93c9f80091bbe0fbc760f263b7d8ddd3e5130662b55fc6d9b4974654285
languageName: node
linkType: hard
@@ -4600,17 +4428,6 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/object-multiplex@npm:^1.1.0":
- version: 1.2.0
- resolution: "@metamask/object-multiplex@npm:1.2.0"
- dependencies:
- end-of-stream: "npm:^1.4.4"
- once: "npm:^1.4.0"
- readable-stream: "npm:^2.3.3"
- checksum: 7c622639cc164c3b780294d790311e4bcb327faf14626717728022e95da5834f32fe4e242d8f4e7d9b8c2b83f0c76450922786b2f6ef50e777bfe119b78bdab7
- languageName: node
- linkType: hard
-
"@metamask/object-multiplex@npm:^2.0.0":
version: 2.0.0
resolution: "@metamask/object-multiplex@npm:2.0.0"
@@ -4652,26 +4469,6 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/permission-controller@npm:^5.0.0":
- version: 5.0.1
- resolution: "@metamask/permission-controller@npm:5.0.1"
- dependencies:
- "@metamask/approval-controller": "npm:^4.1.0"
- "@metamask/base-controller": "npm:^3.2.3"
- "@metamask/controller-utils": "npm:^5.0.2"
- "@metamask/json-rpc-engine": "npm:^7.3.0"
- "@metamask/rpc-errors": "npm:^6.1.0"
- "@metamask/utils": "npm:^8.2.0"
- "@types/deep-freeze-strict": "npm:^1.1.0"
- deep-freeze-strict: "npm:^1.1.1"
- immer: "npm:^9.0.6"
- nanoid: "npm:^3.1.31"
- peerDependencies:
- "@metamask/approval-controller": ^4.1.0
- checksum: 864c83c5e590a4ba251904b7d164a10413185db7f6e6fb474874a7eadac2261af773e796d75fc782c6add1f544e860b35e3f9a0c1d4c3e5bf2b66935ed207b49
- languageName: node
- linkType: hard
-
"@metamask/permission-controller@npm:^7.0.0, @metamask/permission-controller@npm:^7.1.0":
version: 7.1.0
resolution: "@metamask/permission-controller@npm:7.1.0"
@@ -4737,6 +4534,23 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/polling-controller@npm:^5.0.0":
+ version: 5.0.0
+ resolution: "@metamask/polling-controller@npm:5.0.0"
+ dependencies:
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/controller-utils": "npm:^8.0.2"
+ "@metamask/network-controller": "npm:^17.2.0"
+ "@metamask/utils": "npm:^8.3.0"
+ "@types/uuid": "npm:^8.3.0"
+ fast-json-stable-stringify: "npm:^2.1.0"
+ uuid: "npm:^8.3.2"
+ peerDependencies:
+ "@metamask/network-controller": ^17.2.0
+ checksum: 78655074916c445594787e8573e10a992933477cf702aa458c28396b49dbcd13a60bfb1fac46f680819139f918eacff1f4c1e6386f5d74ceaa3715f8ee48d79f
+ languageName: node
+ linkType: hard
+
"@metamask/post-message-stream@npm:^7.0.0":
version: 7.0.0
resolution: "@metamask/post-message-stream@npm:7.0.0"
@@ -4747,16 +4561,19 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/ppom-validator@npm:^0.10.0":
- version: 0.10.0
- resolution: "@metamask/ppom-validator@npm:0.10.0"
+"@metamask/ppom-validator@npm:^0.22.0":
+ version: 0.22.0
+ resolution: "@metamask/ppom-validator@npm:0.22.0"
dependencies:
"@metamask/base-controller": "npm:^3.0.0"
- "@metamask/controller-utils": "npm:^4.0.0"
+ "@metamask/controller-utils": "npm:^8.0.1"
+ "@metamask/network-controller": "npm:^17.0.0"
await-semaphore: "npm:^0.1.3"
+ crypto-js: "npm:^4.2.0"
elliptic: "npm:^6.5.4"
+ eslint-plugin-n: "npm:^16.6.2"
json-rpc-random-id: "npm:^1.0.1"
- checksum: fae284ecfbb186b6e434c084bbe41e8968370f8f974bc611d91f70a30494be2b0ce2019c27ab713be7d90c99bfaa2e26587a886ca84e7885b31660c0988ca05a
+ checksum: b353c9a24a35972a05f75daf0b438d368e6f154145cfc02be217d335309cec0d94c51da78bbe6aadb4f6dbcbaea97dc3b2f561e3b5dbe053063a7a81190a8b26
languageName: node
linkType: hard
@@ -4780,25 +4597,6 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/providers@npm:^13.0.0":
- version: 13.1.0
- resolution: "@metamask/providers@npm:13.1.0"
- dependencies:
- "@metamask/json-rpc-engine": "npm:^7.1.1"
- "@metamask/object-multiplex": "npm:^1.1.0"
- "@metamask/rpc-errors": "npm:^6.0.0"
- "@metamask/safe-event-emitter": "npm:^3.0.0"
- "@metamask/utils": "npm:^8.1.0"
- detect-browser: "npm:^5.2.0"
- extension-port-stream: "npm:^2.1.1"
- fast-deep-equal: "npm:^3.1.3"
- is-stream: "npm:^2.0.0"
- json-rpc-middleware-stream: "npm:^4.2.1"
- webextension-polyfill: "npm:^0.10.0"
- checksum: 2ee1802d92d0fd2c733c5d98137e4f92c77a42fbf008a6b19de25d84d48321502031b82aa66501c4ce9c7e863a82c1866fe477349b48ba1151d4b8c2114233e8
- languageName: node
- linkType: hard
-
"@metamask/providers@npm:^14.0.1, @metamask/providers@npm:^14.0.2":
version: 14.0.2
resolution: "@metamask/providers@npm:14.0.2"
@@ -4963,7 +4761,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-controllers@npm:^3.1.0, @metamask/snaps-controllers@npm:^3.4.1":
+"@metamask/snaps-controllers@npm:^3.4.1":
version: 3.6.0
resolution: "@metamask/snaps-controllers@npm:3.6.0"
dependencies:
@@ -5035,17 +4833,6 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-registry@npm:^2.1.0":
- version: 2.1.1
- resolution: "@metamask/snaps-registry@npm:2.1.1"
- dependencies:
- "@metamask/utils": "npm:^8.1.0"
- "@noble/secp256k1": "npm:^1.7.1"
- superstruct: "npm:^1.0.3"
- checksum: f2456314369f3fcf69626903378e8ee5594ff373d74cdcfc53bf9a23d0b16bfc4c341f67b63344ed233972ced8891dc8f05a47fe34cb8ca34cffcb0675d28cdc
- languageName: node
- linkType: hard
-
"@metamask/snaps-registry@npm:^3.0.0":
version: 3.0.0
resolution: "@metamask/snaps-registry@npm:3.0.0"
@@ -5058,22 +4845,6 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-rpc-methods@npm:^3.1.0":
- version: 3.3.0
- resolution: "@metamask/snaps-rpc-methods@npm:3.3.0"
- dependencies:
- "@metamask/key-tree": "npm:^9.0.0"
- "@metamask/permission-controller": "npm:^5.0.0"
- "@metamask/rpc-errors": "npm:^6.1.0"
- "@metamask/snaps-ui": "npm:^3.1.0"
- "@metamask/snaps-utils": "npm:^3.3.0"
- "@metamask/utils": "npm:^8.1.0"
- "@noble/hashes": "npm:^1.3.1"
- superstruct: "npm:^1.0.3"
- checksum: 4242ddb31fa35858d1f8607640798a70ec878ee22371c0bcf50a6b23f45439b442b49a54b43d54489449aed1600b07880e531520a68e5cb617df462c16ce2baf
- languageName: node
- linkType: hard
-
"@metamask/snaps-rpc-methods@npm:^4.1.0":
version: 4.1.0
resolution: "@metamask/snaps-rpc-methods@npm:4.1.0"
@@ -5106,7 +4877,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-sdk@npm:^1.2.0, @metamask/snaps-sdk@npm:^1.3.1, @metamask/snaps-sdk@npm:^1.4.0":
+"@metamask/snaps-sdk@npm:^1.2.0, @metamask/snaps-sdk@npm:^1.3.1, @metamask/snaps-sdk@npm:^1.3.2, @metamask/snaps-sdk@npm:^1.4.0":
version: 1.4.0
resolution: "@metamask/snaps-sdk@npm:1.4.0"
dependencies:
@@ -5120,47 +4891,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-ui@npm:^3.1.0":
- version: 3.1.0
- resolution: "@metamask/snaps-ui@npm:3.1.0"
- dependencies:
- "@metamask/utils": "npm:^8.1.0"
- is-svg: "npm:^4.4.0"
- superstruct: "npm:^1.0.3"
- checksum: 920601fbfa331a52b3f8038f537fad37fabfce1e02f5dc8915b701dde051a02d07d2b7ca7301f7e0d6969c38d57a06a6902ab1c595a33c7ea890ce333af0efdb
- languageName: node
- linkType: hard
-
-"@metamask/snaps-utils@npm:^3.0.0, @metamask/snaps-utils@npm:^3.2.0, @metamask/snaps-utils@npm:^3.3.0":
- version: 3.3.0
- resolution: "@metamask/snaps-utils@npm:3.3.0"
- dependencies:
- "@babel/core": "npm:^7.23.2"
- "@babel/types": "npm:^7.23.0"
- "@metamask/base-controller": "npm:^3.2.0"
- "@metamask/key-tree": "npm:^9.0.0"
- "@metamask/permission-controller": "npm:^5.0.0"
- "@metamask/rpc-errors": "npm:^6.1.0"
- "@metamask/snaps-registry": "npm:^2.1.0"
- "@metamask/snaps-ui": "npm:^3.1.0"
- "@metamask/utils": "npm:^8.1.0"
- "@noble/hashes": "npm:^1.3.1"
- "@scure/base": "npm:^1.1.1"
- chalk: "npm:^4.1.2"
- cron-parser: "npm:^4.5.0"
- fast-deep-equal: "npm:^3.1.3"
- fast-json-stable-stringify: "npm:^2.1.0"
- is-svg: "npm:^4.4.0"
- rfdc: "npm:^1.3.0"
- semver: "npm:^7.5.4"
- ses: "npm:^0.18.8"
- superstruct: "npm:^1.0.3"
- validate-npm-package-name: "npm:^5.0.0"
- checksum: e74f61ab1fb9a623a8bba701df882b844a2a49c4b7876531c75feb0953afe5ad7697409d8f512a4ca9860ca9a3fd7355c205b68b5333dd219ed6001eb31b814c
- languageName: node
- linkType: hard
-
-"@metamask/snaps-utils@npm:^5.0.0, @metamask/snaps-utils@npm:^5.1.1, @metamask/snaps-utils@npm:^5.2.0":
+"@metamask/snaps-utils@npm:^5.0.0, @metamask/snaps-utils@npm:^5.1.1, @metamask/snaps-utils@npm:^5.1.2, @metamask/snaps-utils@npm:^5.2.0":
version: 5.2.0
resolution: "@metamask/snaps-utils@npm:5.2.0"
dependencies:
@@ -5190,10 +4921,10 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/swappable-obj-proxy@npm:^2.1.0":
- version: 2.1.0
- resolution: "@metamask/swappable-obj-proxy@npm:2.1.0"
- checksum: e6628ffbb9c34c07aee2e7f97f00f06eba2d00fcd3f6cac555256dd1b37a73d81eff53030cd129c9dd6db711c9e10c41e857082816f8a0e3de724448c1f2edaa
+"@metamask/swappable-obj-proxy@npm:^2.1.0, @metamask/swappable-obj-proxy@npm:^2.2.0":
+ version: 2.2.0
+ resolution: "@metamask/swappable-obj-proxy@npm:2.2.0"
+ checksum: bc7a1f496d06327f1db84fe2ed75637b6f2f5db0806d3927f250d5abab9cc70a26ff37283ea7f2db7987e48d2540f6821091d1f3000d6771f29c4d91c402f724
languageName: node
linkType: hard
@@ -5236,6 +4967,38 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/transaction-controller@npm:^21.1.0":
+ version: 21.1.0
+ resolution: "@metamask/transaction-controller@npm:21.1.0"
+ dependencies:
+ "@ethereumjs/common": "npm:^3.2.0"
+ "@ethereumjs/tx": "npm:^4.2.0"
+ "@ethersproject/abi": "npm:^5.7.0"
+ "@metamask/approval-controller": "npm:^5.1.2"
+ "@metamask/base-controller": "npm:^4.1.1"
+ "@metamask/controller-utils": "npm:^8.0.2"
+ "@metamask/eth-query": "npm:^4.0.0"
+ "@metamask/gas-fee-controller": "npm:^13.0.0"
+ "@metamask/metamask-eth-abis": "npm:^3.0.0"
+ "@metamask/network-controller": "npm:^17.2.0"
+ "@metamask/rpc-errors": "npm:^6.1.0"
+ "@metamask/utils": "npm:^8.3.0"
+ async-mutex: "npm:^0.2.6"
+ eth-method-registry: "npm:^3.0.0"
+ ethereumjs-util: "npm:^7.0.10"
+ fast-json-patch: "npm:^3.1.1"
+ lodash: "npm:^4.17.21"
+ nonce-tracker: "npm:^3.0.0"
+ uuid: "npm:^8.3.2"
+ peerDependencies:
+ "@metamask/approval-controller": ^5.1.2
+ "@metamask/gas-fee-controller": ^13.0.0
+ "@metamask/network-controller": ^17.2.0
+ babel-runtime: ^6.26.0
+ checksum: 5dbe811870fb0775d017470ec4529fbf46969f072527e3ac7ce18370faafffda32056eeec02ff8b56ed35463aec8ceaeb667c64362db90529faf4b8e2c9c2631
+ languageName: node
+ linkType: hard
+
"@metamask/user-operation-controller@npm:^1.0.0":
version: 1.0.0
resolution: "@metamask/user-operation-controller@npm:1.0.0"
@@ -5409,7 +5172,7 @@ __metadata:
languageName: node
linkType: hard
-"@noble/secp256k1@npm:^1.5.5, @noble/secp256k1@npm:^1.7.0, @noble/secp256k1@npm:^1.7.1":
+"@noble/secp256k1@npm:^1.5.5, @noble/secp256k1@npm:^1.7.0":
version: 1.7.1
resolution: "@noble/secp256k1@npm:1.7.1"
checksum: 214d4756c20ed20809d948d0cc161e95664198cb127266faf747fd7deffe5444901f05fe9f833787738f2c6e60b09e544c2f737f42f73b3699e3999ba15b1b63
@@ -6549,13 +6312,6 @@ __metadata:
languageName: node
linkType: hard
-"@sinclair/typebox@npm:^0.24.1":
- version: 0.24.28
- resolution: "@sinclair/typebox@npm:0.24.28"
- checksum: 326152428f752bd3b5518e3998c1d24dea47dc1970b24dd34e89201f5836727633baf1486422b967b0c9477a2e767a53e04132c6c0f14628b9b8353394871cf3
- languageName: node
- linkType: hard
-
"@sinclair/typebox@npm:^0.27.8":
version: 0.27.8
resolution: "@sinclair/typebox@npm:0.27.8"
@@ -6579,21 +6335,30 @@ __metadata:
languageName: node
linkType: hard
-"@sinonjs/fake-timers@npm:^6.0.0":
- version: 6.0.1
- resolution: "@sinonjs/fake-timers@npm:6.0.1"
+"@sinonjs/commons@npm:^3.0.0":
+ version: 3.0.1
+ resolution: "@sinonjs/commons@npm:3.0.1"
dependencies:
- "@sinonjs/commons": "npm:^1.7.0"
- checksum: c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395
+ type-detect: "npm:4.0.8"
+ checksum: a0af217ba7044426c78df52c23cedede6daf377586f3ac58857c565769358ab1f44ebf95ba04bbe38814fba6e316ca6f02870a009328294fc2c555d0f85a7117
languageName: node
linkType: hard
-"@sinonjs/fake-timers@npm:^9.1.2":
- version: 9.1.2
- resolution: "@sinonjs/fake-timers@npm:9.1.2"
+"@sinonjs/fake-timers@npm:^10.0.2":
+ version: 10.3.0
+ resolution: "@sinonjs/fake-timers@npm:10.3.0"
+ dependencies:
+ "@sinonjs/commons": "npm:^3.0.0"
+ checksum: 78155c7bd866a85df85e22028e046b8d46cf3e840f72260954f5e3ed5bd97d66c595524305a6841ffb3f681a08f6e5cef572a2cce5442a8a232dc29fb409b83e
+ languageName: node
+ linkType: hard
+
+"@sinonjs/fake-timers@npm:^6.0.0":
+ version: 6.0.1
+ resolution: "@sinonjs/fake-timers@npm:6.0.1"
dependencies:
"@sinonjs/commons": "npm:^1.7.0"
- checksum: 033c74ad389b0655b6af2fa1af31dddf45878e65879f06c5d1940e0ceb053a234f2f46c728dcd97df8ee9312431e45dd7aedaee3a69d47f73a2001a7547fc3d6
+ checksum: c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395
languageName: node
linkType: hard
@@ -7575,12 +7340,12 @@ __metadata:
languageName: node
linkType: hard
-"@storybook/csf@npm:^0.1.0":
- version: 0.1.0
- resolution: "@storybook/csf@npm:0.1.0"
+"@storybook/csf@npm:^0.1.0, @storybook/csf@npm:^0.1.1":
+ version: 0.1.2
+ resolution: "@storybook/csf@npm:0.1.2"
dependencies:
type-fest: "npm:^2.19.0"
- checksum: bd93be38b249247830b463a736ab0b279c2a65d355045d708e88f691e8f203346cadb5d3e886c595fe883eb59c942c8990109b0605d26619116e9593695e47fc
+ checksum: 11168df65e7b6bd0e5d31e7e805c8ba80397fc190cb33424e043b72bbd85d8f826dba082503992d7f606b72484337ab9d091eca947550613e241fbef57780d4c
languageName: node
linkType: hard
@@ -7970,43 +7735,40 @@ __metadata:
languageName: node
linkType: hard
-"@storybook/test-runner@npm:^0.10.0":
- version: 0.10.0
- resolution: "@storybook/test-runner@npm:0.10.0"
- dependencies:
- "@babel/core": "npm:^7.20.7"
- "@babel/generator": "npm:^7.20.7"
- "@babel/preset-env": "npm:^7.20.2"
- "@babel/preset-react": "npm:^7.18.6"
- "@babel/preset-typescript": "npm:^7.18.6"
- "@babel/template": "npm:^7.20.7"
- "@babel/types": "npm:^7.20.7"
+"@storybook/test-runner@npm:^0.14.1":
+ version: 0.14.1
+ resolution: "@storybook/test-runner@npm:0.14.1"
+ dependencies:
+ "@babel/core": "npm:^7.22.5"
+ "@babel/generator": "npm:^7.22.5"
+ "@babel/template": "npm:^7.22.5"
+ "@babel/types": "npm:^7.22.5"
"@storybook/core-common": "npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0"
- "@storybook/csf": "npm:^0.1.0"
+ "@storybook/csf": "npm:^0.1.1"
"@storybook/csf-tools": "npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0"
"@storybook/preview-api": "npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0"
+ "@swc/core": "npm:^1.3.18"
+ "@swc/jest": "npm:^0.2.23"
can-bind-to-host: "npm:^1.1.1"
commander: "npm:^9.0.0"
expect-playwright: "npm:^0.8.0"
- glob: "npm:^8.1.0"
- jest: "npm:^28.0.0"
- jest-circus: "npm:^28.0.0"
- jest-environment-node: "npm:^28.0.0"
- jest-junit: "npm:^14.0.0"
- jest-playwright-preset: "npm:^2.0.0"
- jest-runner: "npm:^28.0.0"
+ glob: "npm:^10.2.2"
+ jest: "npm:^29.6.4"
+ jest-circus: "npm:^29.6.4"
+ jest-environment-node: "npm:^29.6.4"
+ jest-junit: "npm:^16.0.0"
+ jest-playwright-preset: "npm:^3.0.1"
+ jest-runner: "npm:^29.6.4"
jest-serializer-html: "npm:^7.1.0"
jest-watch-typeahead: "npm:^2.0.0"
node-fetch: "npm:^2"
playwright: "npm:^1.14.0"
read-pkg-up: "npm:^7.0.1"
- regenerator-runtime: "npm:^0.13.9"
- semver: "npm:^7.3.7"
tempy: "npm:^1.0.1"
ts-dedent: "npm:^2.0.0"
bin:
- test-storybook: bin/test-storybook.js
- checksum: c459edb316d2428619fb6bab30696d901df69d404bc8bb1d6cd2caabfd455a0be23e81487bb4d9cfd1bf1b9696e5a1fdee484da27ccd64c4df852295602737d7
+ test-storybook: dist/test-storybook.js
+ checksum: 0d2649b09a227ad8136d848adf485656155be812c3c0d424427dc75a0c348953df825383fcd2926a4a1c4a32f687c835b052bbfd042ec0c120f52466bb07da89
languageName: node
linkType: hard
@@ -8089,90 +7851,90 @@ __metadata:
languageName: node
linkType: hard
-"@swc/core-darwin-arm64@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-darwin-arm64@npm:1.3.93"
+"@swc/core-darwin-arm64@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-darwin-arm64@npm:1.3.105"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
-"@swc/core-darwin-x64@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-darwin-x64@npm:1.3.93"
+"@swc/core-darwin-x64@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-darwin-x64@npm:1.3.105"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
-"@swc/core-linux-arm-gnueabihf@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.93"
+"@swc/core-linux-arm-gnueabihf@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.105"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
-"@swc/core-linux-arm64-gnu@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-linux-arm64-gnu@npm:1.3.93"
+"@swc/core-linux-arm64-gnu@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-linux-arm64-gnu@npm:1.3.105"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
-"@swc/core-linux-arm64-musl@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-linux-arm64-musl@npm:1.3.93"
+"@swc/core-linux-arm64-musl@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-linux-arm64-musl@npm:1.3.105"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
-"@swc/core-linux-x64-gnu@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-linux-x64-gnu@npm:1.3.93"
+"@swc/core-linux-x64-gnu@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-linux-x64-gnu@npm:1.3.105"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
-"@swc/core-linux-x64-musl@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-linux-x64-musl@npm:1.3.93"
+"@swc/core-linux-x64-musl@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-linux-x64-musl@npm:1.3.105"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
-"@swc/core-win32-arm64-msvc@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-win32-arm64-msvc@npm:1.3.93"
+"@swc/core-win32-arm64-msvc@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-win32-arm64-msvc@npm:1.3.105"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
-"@swc/core-win32-ia32-msvc@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-win32-ia32-msvc@npm:1.3.93"
+"@swc/core-win32-ia32-msvc@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-win32-ia32-msvc@npm:1.3.105"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
-"@swc/core-win32-x64-msvc@npm:1.3.93":
- version: 1.3.93
- resolution: "@swc/core-win32-x64-msvc@npm:1.3.93"
+"@swc/core-win32-x64-msvc@npm:1.3.105":
+ version: 1.3.105
+ resolution: "@swc/core-win32-x64-msvc@npm:1.3.105"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
-"@swc/core@npm:^1.3.49":
- version: 1.3.93
- resolution: "@swc/core@npm:1.3.93"
+"@swc/core@npm:^1.3.18, @swc/core@npm:^1.3.49":
+ version: 1.3.105
+ resolution: "@swc/core@npm:1.3.105"
dependencies:
- "@swc/core-darwin-arm64": "npm:1.3.93"
- "@swc/core-darwin-x64": "npm:1.3.93"
- "@swc/core-linux-arm-gnueabihf": "npm:1.3.93"
- "@swc/core-linux-arm64-gnu": "npm:1.3.93"
- "@swc/core-linux-arm64-musl": "npm:1.3.93"
- "@swc/core-linux-x64-gnu": "npm:1.3.93"
- "@swc/core-linux-x64-musl": "npm:1.3.93"
- "@swc/core-win32-arm64-msvc": "npm:1.3.93"
- "@swc/core-win32-ia32-msvc": "npm:1.3.93"
- "@swc/core-win32-x64-msvc": "npm:1.3.93"
+ "@swc/core-darwin-arm64": "npm:1.3.105"
+ "@swc/core-darwin-x64": "npm:1.3.105"
+ "@swc/core-linux-arm-gnueabihf": "npm:1.3.105"
+ "@swc/core-linux-arm64-gnu": "npm:1.3.105"
+ "@swc/core-linux-arm64-musl": "npm:1.3.105"
+ "@swc/core-linux-x64-gnu": "npm:1.3.105"
+ "@swc/core-linux-x64-musl": "npm:1.3.105"
+ "@swc/core-win32-arm64-msvc": "npm:1.3.105"
+ "@swc/core-win32-ia32-msvc": "npm:1.3.105"
+ "@swc/core-win32-x64-msvc": "npm:1.3.105"
"@swc/counter": "npm:^0.1.1"
"@swc/types": "npm:^0.1.5"
peerDependencies:
@@ -8201,7 +7963,7 @@ __metadata:
peerDependenciesMeta:
"@swc/helpers":
optional: true
- checksum: 0c28523abea3509d0fff7b2940667c9b5bf76b2505deb3ede8ab3ca8505d880cf563fb9d985483bc16065e79e51927001976d0a5e14449fb28715e5b4c6e0ffd
+ checksum: 15ddc565b05d359cfe9f9ec796411ff9279ba4d856388689e5ecfa62cafb0da4bb113e8f313a60a6853fd09bd4197e87a6a9def4287e7047963ed522904b107c
languageName: node
linkType: hard
@@ -8212,6 +7974,18 @@ __metadata:
languageName: node
linkType: hard
+"@swc/jest@npm:^0.2.23":
+ version: 0.2.31
+ resolution: "@swc/jest@npm:0.2.31"
+ dependencies:
+ "@jest/create-cache-key-function": "npm:^29.7.0"
+ jsonc-parser: "npm:^3.2.0"
+ peerDependencies:
+ "@swc/core": "*"
+ checksum: cbd5a2c4919bc1abd8be29d6a027a800bd6781ff655c6d2f6eceb9b1969ee5b3ffa030c99aae53a1bfd0e43a98bc801f648a630df5e0470810df3e9a706c5c5a
+ languageName: node
+ linkType: hard
+
"@swc/types@npm:^0.1.5":
version: 0.1.5
resolution: "@swc/types@npm:0.1.5"
@@ -9238,10 +9012,12 @@ __metadata:
languageName: node
linkType: hard
-"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^20.4.2":
- version: 20.8.2
- resolution: "@types/node@npm:20.8.2"
- checksum: 61bd39870625d8afcbb4f21d6a0c3a9681f6d508dc6b06f2497e9ad3ec942092a120bcfdbc1757a8e4017308449bc2a9b9865b2b9840b158878a4e8cc0804a3c
+"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^20, @types/node@npm:^20.4.2":
+ version: 20.11.13
+ resolution: "@types/node@npm:20.11.13"
+ dependencies:
+ undici-types: "npm:~5.26.4"
+ checksum: ffe143dd5e52d0d29f5bcea165b752c5355eaff8b6b933441108b540419e14c0c7e0e7912783e914125ab957e30db93f9c827e8dd437ec7e5f03def995e9a5e6
languageName: node
linkType: hard
@@ -9252,7 +9028,7 @@ __metadata:
languageName: node
linkType: hard
-"@types/node@npm:^18, @types/node@npm:^18.0.0":
+"@types/node@npm:^18.0.0":
version: 18.18.9
resolution: "@types/node@npm:18.18.9"
dependencies:
@@ -9291,7 +9067,7 @@ __metadata:
languageName: node
linkType: hard
-"@types/prettier@npm:^2.1.5, @types/prettier@npm:^2.7.2":
+"@types/prettier@npm:^2.7.2":
version: 2.7.2
resolution: "@types/prettier@npm:2.7.2"
checksum: 8b91984884220a4b14b8b0803b5ed02acfe7b8cbee3f4d814e7c021818fbaf936b0d8a67b9aa1bb6c0126fbdd788432095416ffcf48576de71541e998717b18a
@@ -11513,37 +11289,20 @@ __metadata:
languageName: node
linkType: hard
-"babel-jest@npm:^28.1.3":
- version: 28.1.3
- resolution: "babel-jest@npm:28.1.3"
- dependencies:
- "@jest/transform": "npm:^28.1.3"
- "@types/babel__core": "npm:^7.1.14"
- babel-plugin-istanbul: "npm:^6.1.1"
- babel-preset-jest: "npm:^28.1.3"
- chalk: "npm:^4.0.0"
- graceful-fs: "npm:^4.2.9"
- slash: "npm:^3.0.0"
- peerDependencies:
- "@babel/core": ^7.8.0
- checksum: 6dcbf194a037fb3df18d2aee56a3919a98a9b34292d1eb4aad823ebfa8b67f5a55f897213c1aafd52183928e99770319b8a094681ccb2910dc9993e6a7c1fd61
- languageName: node
- linkType: hard
-
-"babel-jest@npm:^29.1.2":
- version: 29.1.2
- resolution: "babel-jest@npm:29.1.2"
+"babel-jest@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "babel-jest@npm:29.7.0"
dependencies:
- "@jest/transform": "npm:^29.1.2"
+ "@jest/transform": "npm:^29.7.0"
"@types/babel__core": "npm:^7.1.14"
babel-plugin-istanbul: "npm:^6.1.1"
- babel-preset-jest: "npm:^29.0.2"
+ babel-preset-jest: "npm:^29.6.3"
chalk: "npm:^4.0.0"
graceful-fs: "npm:^4.2.9"
slash: "npm:^3.0.0"
peerDependencies:
"@babel/core": ^7.8.0
- checksum: bf717adf7338b464f4e4ed6d09bf314627f7aac5a6a7947d8e71451d2129ff43047e04579d7b61aed4885631933ccec6ac8ad58c266e4ca77c68d80ccf5f287e
+ checksum: 8a0953bd813b3a8926008f7351611055548869e9a53dd36d6e7e96679001f71e65fd7dbfe253265c3ba6a4e630dc7c845cf3e78b17d758ef1880313ce8fba258
languageName: node
linkType: hard
@@ -11580,27 +11339,15 @@ __metadata:
languageName: node
linkType: hard
-"babel-plugin-jest-hoist@npm:^28.1.3":
- version: 28.1.3
- resolution: "babel-plugin-jest-hoist@npm:28.1.3"
- dependencies:
- "@babel/template": "npm:^7.3.3"
- "@babel/types": "npm:^7.3.3"
- "@types/babel__core": "npm:^7.1.14"
- "@types/babel__traverse": "npm:^7.0.6"
- checksum: 355e383dae2b50efa0aff73a751f6bc55e7ae19ddfe72c73f4a0ad7667a671175aba17d824833d98b33602da18dd04e5e5d37d03c4f245940d8664c45ad29df5
- languageName: node
- linkType: hard
-
-"babel-plugin-jest-hoist@npm:^29.0.2":
- version: 29.0.2
- resolution: "babel-plugin-jest-hoist@npm:29.0.2"
+"babel-plugin-jest-hoist@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "babel-plugin-jest-hoist@npm:29.6.3"
dependencies:
"@babel/template": "npm:^7.3.3"
"@babel/types": "npm:^7.3.3"
"@types/babel__core": "npm:^7.1.14"
"@types/babel__traverse": "npm:^7.0.6"
- checksum: 3d5feebc61bad597e1ee63c35dc0d3e27b95927e042eb2dbc7884b7b96407ba0e7517374a84edaecb1fd74d5c4e9e742c5b978b709f326fcf811a4fea5e078e8
+ checksum: 9bfa86ec4170bd805ab8ca5001ae50d8afcb30554d236ba4a7ffc156c1a92452e220e4acbd98daefc12bf0216fccd092d0a2efed49e7e384ec59e0597a926d65
languageName: node
linkType: hard
@@ -11691,27 +11438,15 @@ __metadata:
languageName: node
linkType: hard
-"babel-preset-jest@npm:^28.1.3":
- version: 28.1.3
- resolution: "babel-preset-jest@npm:28.1.3"
+"babel-preset-jest@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "babel-preset-jest@npm:29.6.3"
dependencies:
- babel-plugin-jest-hoist: "npm:^28.1.3"
+ babel-plugin-jest-hoist: "npm:^29.6.3"
babel-preset-current-node-syntax: "npm:^1.0.0"
peerDependencies:
"@babel/core": ^7.0.0
- checksum: 8248a4a5ca4242cc06ad13b10b9183ad2664da8fb0da060c352223dcf286f0ce9c708fa17901dc44ecabec25e6d309e5e5b9830a61dd777c3925f187a345a47d
- languageName: node
- linkType: hard
-
-"babel-preset-jest@npm:^29.0.2":
- version: 29.0.2
- resolution: "babel-preset-jest@npm:29.0.2"
- dependencies:
- babel-plugin-jest-hoist: "npm:^29.0.2"
- babel-preset-current-node-syntax: "npm:^1.0.0"
- peerDependencies:
- "@babel/core": ^7.0.0
- checksum: 485db525f4cd38c02c29edcd7240dd232e8d6dbcaef88bfa4765ad3057ed733512f1b7aad06f4bf9661afefeb0ada2c4e259d130113b0289d7db574f82bbd4f8
+ checksum: aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb
languageName: node
linkType: hard
@@ -12608,6 +12343,13 @@ __metadata:
languageName: node
linkType: hard
+"builtin-modules@npm:^3.3.0":
+ version: 3.3.0
+ resolution: "builtin-modules@npm:3.3.0"
+ checksum: 62e063ab40c0c1efccbfa9ffa31873e4f9d57408cb396a2649981a0ecbce56aabc93c28feaccbc5658c95aab2703ad1d11980e62ec2e5e72637404e1eb60f39e
+ languageName: node
+ linkType: hard
+
"builtin-status-codes@npm:^3.0.0":
version: 3.0.0
resolution: "builtin-status-codes@npm:3.0.0"
@@ -12615,7 +12357,7 @@ __metadata:
languageName: node
linkType: hard
-"builtins@npm:^5.0.0":
+"builtins@npm:^5.0.0, builtins@npm:^5.0.1":
version: 5.0.1
resolution: "builtins@npm:5.0.1"
dependencies:
@@ -14103,6 +13845,23 @@ __metadata:
languageName: node
linkType: hard
+"create-jest@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "create-jest@npm:29.7.0"
+ dependencies:
+ "@jest/types": "npm:^29.6.3"
+ chalk: "npm:^4.0.0"
+ exit: "npm:^0.1.2"
+ graceful-fs: "npm:^4.2.9"
+ jest-config: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ prompts: "npm:^2.0.1"
+ bin:
+ create-jest: bin/create-jest.js
+ checksum: 847b4764451672b4174be4d5c6d7d63442ec3aa5f3de52af924e4d996d87d7801c18e125504f25232fc75840f6625b3ac85860fac6ce799b5efae7bdcaf4a2b7
+ languageName: node
+ linkType: hard
+
"create-require@npm:^1.1.0":
version: 1.1.1
resolution: "create-require@npm:1.1.1"
@@ -14176,6 +13935,13 @@ __metadata:
languageName: node
linkType: hard
+"crypto-js@npm:^4.2.0":
+ version: 4.2.0
+ resolution: "crypto-js@npm:4.2.0"
+ checksum: c7bcc56a6e01c3c397e95aa4a74e4241321f04677f9a618a8f48a63b5781617248afb9adb0629824792e7ec20ca0d4241a49b6b2938ae6f973ec4efc5c53c924
+ languageName: node
+ linkType: hard
+
"crypto-random-string@npm:^1.0.0":
version: 1.0.0
resolution: "crypto-random-string@npm:1.0.0"
@@ -14606,6 +14372,18 @@ __metadata:
languageName: node
linkType: hard
+"dedent@npm:^1.0.0":
+ version: 1.5.1
+ resolution: "dedent@npm:1.5.1"
+ peerDependencies:
+ babel-plugin-macros: ^3.1.0
+ peerDependenciesMeta:
+ babel-plugin-macros:
+ optional: true
+ checksum: fc00a8bc3dfb7c413a778dc40ee8151b6c6ff35159d641f36ecd839c1df5c6e0ec5f4992e658c82624a1a62aaecaffc23b9c965ceb0bbf4d698bfc16469ac27d
+ languageName: node
+ linkType: hard
+
"deep-equal@npm:^2.2.0":
version: 2.2.2
resolution: "deep-equal@npm:2.2.2"
@@ -15336,17 +15114,10 @@ __metadata:
languageName: node
linkType: hard
-"diff-sequences@npm:^28.1.1":
- version: 28.1.1
- resolution: "diff-sequences@npm:28.1.1"
- checksum: 89752708215cf0d13ec98cb3cded36154951beec9ac8c23d5a665498ba880e1e3aad544ad046ad5223c141fc35b362665fae534e14a253654da77b514a28438d
- languageName: node
- linkType: hard
-
-"diff-sequences@npm:^29.4.3":
- version: 29.4.3
- resolution: "diff-sequences@npm:29.4.3"
- checksum: 2287b259400513332d757f921eeda7c740863a919a00bd1d1b22ab2532b3e763538c404aec0953a813bbe33e660cbc77d0742875d6674d8dc5bc31d74ec88cc1
+"diff-sequences@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "diff-sequences@npm:29.6.3"
+ checksum: 179daf9d2f9af5c57ad66d97cb902a538bcf8ed64963fa7aa0c329b3de3665ce2eb6ffdc2f69f29d445fa4af2517e5e55e5b6e00c00a9ae4f43645f97f7078cb
languageName: node
linkType: hard
@@ -15785,13 +15556,6 @@ __metadata:
languageName: node
linkType: hard
-"emittery@npm:^0.10.2":
- version: 0.10.2
- resolution: "emittery@npm:0.10.2"
- checksum: fa86fc2b1f4c792d7d479a4de1a6a1f74b0b597770bae770336f0be6501e64be0995aa07d284ae502b269f5cec960cd0c44c91dd090d06d8deecee6d9787e396
- languageName: node
- linkType: hard
-
"emittery@npm:^0.13.1":
version: 0.13.1
resolution: "emittery@npm:0.13.1"
@@ -16318,6 +16082,15 @@ __metadata:
languageName: node
linkType: hard
+"eslint-compat-utils@npm:^0.1.2":
+ version: 0.1.2
+ resolution: "eslint-compat-utils@npm:0.1.2"
+ peerDependencies:
+ eslint: ">=6.0.0"
+ checksum: 8c273889485ab863f2b6089c36f042dd2d9bf65d219fa256c1991f9466ea8261f3ab753a017a6d8e93bec84abd568fe3e10216f3fda5b41d05e3dce3b2a5e514
+ languageName: node
+ linkType: hard
+
"eslint-config-prettier@npm:^8.5.0":
version: 8.5.0
resolution: "eslint-config-prettier@npm:8.5.0"
@@ -16381,6 +16154,19 @@ __metadata:
languageName: node
linkType: hard
+"eslint-plugin-es-x@npm:^7.5.0":
+ version: 7.5.0
+ resolution: "eslint-plugin-es-x@npm:7.5.0"
+ dependencies:
+ "@eslint-community/eslint-utils": "npm:^4.1.2"
+ "@eslint-community/regexpp": "npm:^4.6.0"
+ eslint-compat-utils: "npm:^0.1.2"
+ peerDependencies:
+ eslint: ">=8"
+ checksum: b0aa59e5a9fe034d6d485969091abfcdc6893bc0b9b145864d29307b03465141cc073bed806d9cb1a343a561362f2d0e9b34526af8fe8b7ca3cd8aa144f3720a
+ languageName: node
+ linkType: hard
+
"eslint-plugin-es@npm:^3.0.0":
version: 3.0.1
resolution: "eslint-plugin-es@npm:3.0.1"
@@ -16462,6 +16248,27 @@ __metadata:
languageName: node
linkType: hard
+"eslint-plugin-n@npm:^16.6.2":
+ version: 16.6.2
+ resolution: "eslint-plugin-n@npm:16.6.2"
+ dependencies:
+ "@eslint-community/eslint-utils": "npm:^4.4.0"
+ builtins: "npm:^5.0.1"
+ eslint-plugin-es-x: "npm:^7.5.0"
+ get-tsconfig: "npm:^4.7.0"
+ globals: "npm:^13.24.0"
+ ignore: "npm:^5.2.4"
+ is-builtin-module: "npm:^3.2.1"
+ is-core-module: "npm:^2.12.1"
+ minimatch: "npm:^3.1.2"
+ resolve: "npm:^1.22.2"
+ semver: "npm:^7.5.3"
+ peerDependencies:
+ eslint: ">=7.0.0"
+ checksum: e0f600d03d3a3df57e9a811648b1b534a6d67c90ea9406340ddf3763c2b87cf5ef910b390f787ca5cb27c8d8ff36aad42d70209b54e2a1cb4cc2507ca417229a
+ languageName: node
+ linkType: hard
+
"eslint-plugin-no-unsanitized@npm:4.0.2":
version: 4.0.2
resolution: "eslint-plugin-no-unsanitized@npm:4.0.2"
@@ -17323,30 +17130,16 @@ __metadata:
languageName: node
linkType: hard
-"expect@npm:^28.1.3":
- version: 28.1.3
- resolution: "expect@npm:28.1.3"
- dependencies:
- "@jest/expect-utils": "npm:^28.1.3"
- jest-get-type: "npm:^28.0.2"
- jest-matcher-utils: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- checksum: 87033c88f7a578063ae7de98000fbd423bdb751756b1c6a1c69cd2b093bdb8b11a5b7a66eb89984068850d14978c7daffc2cc8ed56eb912424c24885a7573061
- languageName: node
- linkType: hard
-
-"expect@npm:^29.0.0, expect@npm:^29.6.2":
- version: 29.6.2
- resolution: "expect@npm:29.6.2"
+"expect@npm:^29.0.0, expect@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "expect@npm:29.7.0"
dependencies:
- "@jest/expect-utils": "npm:^29.6.2"
- "@types/node": "npm:*"
- jest-get-type: "npm:^29.4.3"
- jest-matcher-utils: "npm:^29.6.2"
- jest-message-util: "npm:^29.6.2"
- jest-util: "npm:^29.6.2"
- checksum: 304472c4c63fc89accdf32a6817c62945efbcb3d536347dd49bc793dfc91f73fd9661411e0cc919f483ef309be589e33dd5bc9a27b55a5d88ae99009ad0df8f7
+ "@jest/expect-utils": "npm:^29.7.0"
+ jest-get-type: "npm:^29.6.3"
+ jest-matcher-utils: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ checksum: 63f97bc51f56a491950fb525f9ad94f1916e8a014947f8d8445d3847a665b5471b768522d659f5e865db20b6c2033d2ac10f35fcbd881a4d26407a4f6f18451a
languageName: node
linkType: hard
@@ -17422,7 +17215,7 @@ __metadata:
languageName: node
linkType: hard
-"extension-port-stream@npm:^2.0.0, extension-port-stream@npm:^2.1.1":
+"extension-port-stream@npm:^2.0.0":
version: 2.1.1
resolution: "extension-port-stream@npm:2.1.1"
dependencies:
@@ -18693,6 +18486,15 @@ __metadata:
languageName: node
linkType: hard
+"get-tsconfig@npm:^4.7.0":
+ version: 4.7.2
+ resolution: "get-tsconfig@npm:4.7.2"
+ dependencies:
+ resolve-pkg-maps: "npm:^1.0.0"
+ checksum: f21135848fb5d16012269b7b34b186af7a41824830f8616aba17a15eb4d9e54fdc876833f1e21768395215a826c8145582f5acd594ae2b4de3284d10b38d20f8
+ languageName: node
+ linkType: hard
+
"get-uri@npm:^6.0.1":
version: 6.0.2
resolution: "get-uri@npm:6.0.2"
@@ -18900,7 +18702,7 @@ __metadata:
languageName: node
linkType: hard
-"glob@npm:^8.0.1, glob@npm:^8.1.0":
+"glob@npm:^8.0.1":
version: 8.1.0
resolution: "glob@npm:8.1.0"
dependencies:
@@ -19019,12 +18821,12 @@ __metadata:
languageName: node
linkType: hard
-"globals@npm:^13.19.0":
- version: 13.20.0
- resolution: "globals@npm:13.20.0"
+"globals@npm:^13.19.0, globals@npm:^13.24.0":
+ version: 13.24.0
+ resolution: "globals@npm:13.24.0"
dependencies:
type-fest: "npm:^0.20.2"
- checksum: 9df85cde2f0dce6ac9b3a5e08bec109d2f3b38ddd055a83867e0672c55704866d53ce6a4265859fa630624baadd46f50ca38602a13607ad86be853a8c179d3e7
+ checksum: 62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e
languageName: node
linkType: hard
@@ -19200,8 +19002,8 @@ __metadata:
linkType: hard
"gridplus-sdk@npm:^2.5.1":
- version: 2.5.1
- resolution: "gridplus-sdk@npm:2.5.1"
+ version: 2.5.2
+ resolution: "gridplus-sdk@npm:2.5.2"
dependencies:
"@ethereumjs/common": "npm:3.1.1"
"@ethereumjs/tx": "npm:4.1.1"
@@ -19222,7 +19024,7 @@ __metadata:
rlp: "npm:^3.0.0"
secp256k1: "npm:4.0.2"
uuid: "npm:^9.0.0"
- checksum: 57deeae78fc5f904309e689054baabaed8b078b896ecfd5d724889c6ea424a113db64c3fd79d4dca7cc5f558167d7af754506df5c0692ee76087822ae60c3873
+ checksum: 566a9cb7a028cd9f9b650aab3d93c32b88eb4fa7bdf44b506b4cdc85e27dc91dbd3f3297aeed0e8abe8135dc7fbfce6c7d0381d26ab88a51acf4d90195140369
languageName: node
linkType: hard
@@ -20157,10 +19959,10 @@ __metadata:
languageName: node
linkType: hard
-"ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0":
- version: 5.2.0
- resolution: "ignore@npm:5.2.0"
- checksum: 30283f05fb7d867ee0e08faebb3e69caba2c6c55092042cd061eac1b37a3e78db72bfcfbb08b3598999344fba3d93a9c693b5401da5faaecc0fb7c2dce87beb4
+"ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4":
+ version: 5.3.0
+ resolution: "ignore@npm:5.3.0"
+ checksum: 51594355cea4c6ad6b28b3b85eb81afa7b988a1871feefd7062baf136c95aa06760ee934fa9590e43d967bd377ce84a4cf6135fbeb6063e063f1182a0e9a3bcd
languageName: node
linkType: hard
@@ -20543,6 +20345,15 @@ __metadata:
languageName: node
linkType: hard
+"is-builtin-module@npm:^3.2.1":
+ version: 3.2.1
+ resolution: "is-builtin-module@npm:3.2.1"
+ dependencies:
+ builtin-modules: "npm:^3.3.0"
+ checksum: e8f0ffc19a98240bda9c7ada84d846486365af88d14616e737d280d378695c8c448a621dcafc8332dbf0fcd0a17b0763b845400709963fa9151ddffece90ae88
+ languageName: node
+ linkType: hard
+
"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7":
version: 1.2.7
resolution: "is-callable@npm:1.2.7"
@@ -20561,7 +20372,7 @@ __metadata:
languageName: node
linkType: hard
-"is-core-module@npm:^2.13.0, is-core-module@npm:^2.4.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0":
+"is-core-module@npm:^2.12.1, is-core-module@npm:^2.13.0, is-core-module@npm:^2.4.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0":
version: 2.13.1
resolution: "is-core-module@npm:2.13.1"
dependencies:
@@ -21343,7 +21154,7 @@ __metadata:
languageName: node
linkType: hard
-"istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0":
+"istanbul-lib-instrument@npm:^5.0.4":
version: 5.2.0
resolution: "istanbul-lib-instrument@npm:5.2.0"
dependencies:
@@ -21356,6 +21167,19 @@ __metadata:
languageName: node
linkType: hard
+"istanbul-lib-instrument@npm:^6.0.0":
+ version: 6.0.1
+ resolution: "istanbul-lib-instrument@npm:6.0.1"
+ dependencies:
+ "@babel/core": "npm:^7.12.3"
+ "@babel/parser": "npm:^7.14.7"
+ "@istanbuljs/schema": "npm:^0.1.2"
+ istanbul-lib-coverage: "npm:^3.2.0"
+ semver: "npm:^7.5.4"
+ checksum: 95fd8c66e586840989cb3c7819c6da66c4742a6fedbf16b51a5c7f1898941ad07b79ddff020f479d3a1d76743ecdbf255d93c35221875687477d4b118026e7e7
+ languageName: node
+ linkType: hard
+
"istanbul-lib-processinfo@npm:^2.0.2":
version: 2.0.2
resolution: "istanbul-lib-processinfo@npm:2.0.2"
@@ -21454,122 +21278,59 @@ __metadata:
languageName: node
linkType: hard
-"jest-changed-files@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-changed-files@npm:28.1.3"
+"jest-changed-files@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-changed-files@npm:29.7.0"
dependencies:
execa: "npm:^5.0.0"
+ jest-util: "npm:^29.7.0"
p-limit: "npm:^3.1.0"
- checksum: 206be715fed00c70d69f46f6274129816b2959dd9fe5d77b7c929d572eef8f55092baea48f51cf45848edd17e23b00aa720201b5e7781904e6ede06ba666e668
+ checksum: 3d93742e56b1a73a145d55b66e96711fbf87ef89b96c2fab7cfdfba8ec06612591a982111ca2b712bb853dbc16831ec8b43585a2a96b83862d6767de59cbf83d
languageName: node
linkType: hard
-"jest-changed-files@npm:^29.0.0":
- version: 29.0.0
- resolution: "jest-changed-files@npm:29.0.0"
+"jest-circus@npm:^29.6.4, jest-circus@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-circus@npm:29.7.0"
dependencies:
- execa: "npm:^5.0.0"
- p-limit: "npm:^3.1.0"
- checksum: 9783957f16aef2bfa38c952605799e878f6136fed16acd7d1da76481dc8da952fc9a52dc7fbfb1b56a840f9a5dddff2e2f6a97a619a2b0e9656990e59e11075d
- languageName: node
- linkType: hard
-
-"jest-circus@npm:^28.0.0, jest-circus@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-circus@npm:28.1.3"
- dependencies:
- "@jest/environment": "npm:^28.1.3"
- "@jest/expect": "npm:^28.1.3"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/environment": "npm:^29.7.0"
+ "@jest/expect": "npm:^29.7.0"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
co: "npm:^4.6.0"
- dedent: "npm:^0.7.0"
+ dedent: "npm:^1.0.0"
is-generator-fn: "npm:^2.0.0"
- jest-each: "npm:^28.1.3"
- jest-matcher-utils: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-runtime: "npm:^28.1.3"
- jest-snapshot: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
+ jest-each: "npm:^29.7.0"
+ jest-matcher-utils: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-runtime: "npm:^29.7.0"
+ jest-snapshot: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
p-limit: "npm:^3.1.0"
- pretty-format: "npm:^28.1.3"
+ pretty-format: "npm:^29.7.0"
+ pure-rand: "npm:^6.0.0"
slash: "npm:^3.0.0"
stack-utils: "npm:^2.0.3"
- checksum: 3ac1f369cadbdd1982c123c04bc69f140b9790a8d0a729084f53aa13154bbdf318ba162dc70daecc37ef1d620afa339408d6b99a0314306238c547dc6a25b4a3
+ checksum: 716a8e3f40572fd0213bcfc1da90274bf30d856e5133af58089a6ce45089b63f4d679bd44e6be9d320e8390483ebc3ae9921981993986d21639d9019b523123d
languageName: node
linkType: hard
-"jest-circus@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-circus@npm:29.1.2"
+"jest-cli@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-cli@npm:29.7.0"
dependencies:
- "@jest/environment": "npm:^29.1.2"
- "@jest/expect": "npm:^29.1.2"
- "@jest/test-result": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- "@types/node": "npm:*"
- chalk: "npm:^4.0.0"
- co: "npm:^4.6.0"
- dedent: "npm:^0.7.0"
- is-generator-fn: "npm:^2.0.0"
- jest-each: "npm:^29.1.2"
- jest-matcher-utils: "npm:^29.1.2"
- jest-message-util: "npm:^29.1.2"
- jest-runtime: "npm:^29.1.2"
- jest-snapshot: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- p-limit: "npm:^3.1.0"
- pretty-format: "npm:^29.1.2"
- slash: "npm:^3.0.0"
- stack-utils: "npm:^2.0.3"
- checksum: b03924483352e3945321870f7a660a40ea114fb0e68f8a1284d209fef298d26e54588633c63dfe6174175934503f6034741ed8b57471b8df411a5f059702a701
- languageName: node
- linkType: hard
-
-"jest-cli@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-cli@npm:28.1.3"
- dependencies:
- "@jest/core": "npm:^28.1.3"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/core": "npm:^29.7.0"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
chalk: "npm:^4.0.0"
+ create-jest: "npm:^29.7.0"
exit: "npm:^0.1.2"
- graceful-fs: "npm:^4.2.9"
import-local: "npm:^3.0.2"
- jest-config: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- jest-validate: "npm:^28.1.3"
- prompts: "npm:^2.0.1"
- yargs: "npm:^17.3.1"
- peerDependencies:
- node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
- peerDependenciesMeta:
- node-notifier:
- optional: true
- bin:
- jest: bin/jest.js
- checksum: 935a0c517e7b972e60543fdb921302fc63d78e629ab077195c91336279c0815978ca2e03c65ec6dbff3226a5c4ee64b13c7ef5a86387330c9da54454cd4bbbfb
- languageName: node
- linkType: hard
-
-"jest-cli@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-cli@npm:29.1.2"
- dependencies:
- "@jest/core": "npm:^29.1.2"
- "@jest/test-result": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- chalk: "npm:^4.0.0"
- exit: "npm:^0.1.2"
- graceful-fs: "npm:^4.2.9"
- import-local: "npm:^3.0.2"
- jest-config: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- jest-validate: "npm:^29.1.2"
- prompts: "npm:^2.0.1"
+ jest-config: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ jest-validate: "npm:^29.7.0"
yargs: "npm:^17.3.1"
peerDependencies:
node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
@@ -21578,34 +21339,34 @@ __metadata:
optional: true
bin:
jest: bin/jest.js
- checksum: ec0f141b92fd621991c7638703263feff55e545723d3421914cc34135d83ceed6e091975b3eca49f83aac711bf8ec258ca5c31771b3516c2953c71a95d7a1755
+ checksum: 6cc62b34d002c034203065a31e5e9a19e7c76d9e8ef447a6f70f759c0714cb212c6245f75e270ba458620f9c7b26063cd8cf6cd1f7e3afd659a7cc08add17307
languageName: node
linkType: hard
-"jest-config@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-config@npm:28.1.3"
+"jest-config@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-config@npm:29.7.0"
dependencies:
"@babel/core": "npm:^7.11.6"
- "@jest/test-sequencer": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- babel-jest: "npm:^28.1.3"
+ "@jest/test-sequencer": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
+ babel-jest: "npm:^29.7.0"
chalk: "npm:^4.0.0"
ci-info: "npm:^3.2.0"
deepmerge: "npm:^4.2.2"
glob: "npm:^7.1.3"
graceful-fs: "npm:^4.2.9"
- jest-circus: "npm:^28.1.3"
- jest-environment-node: "npm:^28.1.3"
- jest-get-type: "npm:^28.0.2"
- jest-regex-util: "npm:^28.0.2"
- jest-resolve: "npm:^28.1.3"
- jest-runner: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- jest-validate: "npm:^28.1.3"
+ jest-circus: "npm:^29.7.0"
+ jest-environment-node: "npm:^29.7.0"
+ jest-get-type: "npm:^29.6.3"
+ jest-regex-util: "npm:^29.6.3"
+ jest-resolve: "npm:^29.7.0"
+ jest-runner: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ jest-validate: "npm:^29.7.0"
micromatch: "npm:^4.0.4"
parse-json: "npm:^5.2.0"
- pretty-format: "npm:^28.1.3"
+ pretty-format: "npm:^29.7.0"
slash: "npm:^3.0.0"
strip-json-comments: "npm:^3.1.1"
peerDependencies:
@@ -21616,45 +21377,7 @@ __metadata:
optional: true
ts-node:
optional: true
- checksum: 457d8709e24e0e4d8a8a8e074a65092e896d80f30d80c0448f8ce6a24bd0b30060a1a593a20aa7fb8c3c2228d519f0a979ccdff3a176efb60afc7187785d59cf
- languageName: node
- linkType: hard
-
-"jest-config@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-config@npm:29.1.2"
- dependencies:
- "@babel/core": "npm:^7.11.6"
- "@jest/test-sequencer": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- babel-jest: "npm:^29.1.2"
- chalk: "npm:^4.0.0"
- ci-info: "npm:^3.2.0"
- deepmerge: "npm:^4.2.2"
- glob: "npm:^7.1.3"
- graceful-fs: "npm:^4.2.9"
- jest-circus: "npm:^29.1.2"
- jest-environment-node: "npm:^29.1.2"
- jest-get-type: "npm:^29.0.0"
- jest-regex-util: "npm:^29.0.0"
- jest-resolve: "npm:^29.1.2"
- jest-runner: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- jest-validate: "npm:^29.1.2"
- micromatch: "npm:^4.0.4"
- parse-json: "npm:^5.2.0"
- pretty-format: "npm:^29.1.2"
- slash: "npm:^3.0.0"
- strip-json-comments: "npm:^3.1.1"
- peerDependencies:
- "@types/node": "*"
- ts-node: ">=9.0.0"
- peerDependenciesMeta:
- "@types/node":
- optional: true
- ts-node:
- optional: true
- checksum: acf41c7ba040d43d8a9a311208c1b2e0fcabefb8e7125a11c7f1ac81f07d49a072a12c3df3807c15bcb3171920d838fcc576c33ddd101d6b99fdd0d781ddb21c
+ checksum: 6bdf570e9592e7d7dd5124fc0e21f5fe92bd15033513632431b211797e3ab57eaa312f83cc6481b3094b72324e369e876f163579d60016677c117ec4853cf02b
languageName: node
linkType: hard
@@ -21665,71 +21388,37 @@ __metadata:
languageName: node
linkType: hard
-"jest-diff@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-diff@npm:28.1.3"
+"jest-diff@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-diff@npm:29.7.0"
dependencies:
chalk: "npm:^4.0.0"
- diff-sequences: "npm:^28.1.1"
- jest-get-type: "npm:^28.0.2"
- pretty-format: "npm:^28.1.3"
- checksum: 42b8d82c59df879b2cfdf3583fecd40c31ce8c9364644d8d430f5bd533a32e475ca0b383b7a744293332008c50f7901bedeac73c60463ac9e7e2b80249e1325c
+ diff-sequences: "npm:^29.6.3"
+ jest-get-type: "npm:^29.6.3"
+ pretty-format: "npm:^29.7.0"
+ checksum: 6f3a7eb9cd9de5ea9e5aa94aed535631fa6f80221832952839b3cb59dd419b91c20b73887deb0b62230d06d02d6b6cf34ebb810b88d904bb4fe1e2e4f0905c98
languageName: node
linkType: hard
-"jest-diff@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-diff@npm:29.6.2"
- dependencies:
- chalk: "npm:^4.0.0"
- diff-sequences: "npm:^29.4.3"
- jest-get-type: "npm:^29.4.3"
- pretty-format: "npm:^29.6.2"
- checksum: 8c66d29afbb64b4cb1c0daa7c20a7838b32ec16e989f7767f7088b466bfa64d7a501b3f8592c6ab148dde19645740cb868a18b29b992eb72517842287c03144e
- languageName: node
- linkType: hard
-
-"jest-docblock@npm:^28.1.1":
- version: 28.1.1
- resolution: "jest-docblock@npm:28.1.1"
+"jest-docblock@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-docblock@npm:29.7.0"
dependencies:
detect-newline: "npm:^3.0.0"
- checksum: 4062cb9ba54c88c88f5452fcd054937f35755240014ea277ff8dbfde30efcbdb77a4844a09279e55ec98f2fe9a1978a9b8583315e93fdf03602a619ae070356b
+ checksum: 8d48818055bc96c9e4ec2e217a5a375623c0d0bfae8d22c26e011074940c202aa2534a3362294c81d981046885c05d304376afba9f2874143025981148f3e96d
languageName: node
linkType: hard
-"jest-docblock@npm:^29.0.0":
- version: 29.0.0
- resolution: "jest-docblock@npm:29.0.0"
+"jest-each@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-each@npm:29.7.0"
dependencies:
- detect-newline: "npm:^3.0.0"
- checksum: c6d6c34d91ba308a3832d85999ceaec1ecb0f9853eca82ab824601bd8ee89dba1483030105ff4d60fb5725c8f664afd9aff13f6c2b32dfe1b562923044440c72
- languageName: node
- linkType: hard
-
-"jest-each@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-each@npm:28.1.3"
- dependencies:
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
chalk: "npm:^4.0.0"
- jest-get-type: "npm:^28.0.2"
- jest-util: "npm:^28.1.3"
- pretty-format: "npm:^28.1.3"
- checksum: 4877cdda70048923ad6aabf25779e3e2c6bc580253d95739b8af291fbc506b95b043031b498f26807093abe9e6e93ecd7b50e3ce5b7ab175fc21637a197a248b
- languageName: node
- linkType: hard
-
-"jest-each@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-each@npm:29.1.2"
- dependencies:
- "@jest/types": "npm:^29.1.2"
- chalk: "npm:^4.0.0"
- jest-get-type: "npm:^29.0.0"
- jest-util: "npm:^29.1.2"
- pretty-format: "npm:^29.1.2"
- checksum: 61e47e195d1990be018bc3a2eae0d0246792cc6cfacc02bbc9a50ee132908801dd92e3012d5fda80486463f665c1646acbcfd7634854c257f5934e39b79a49ad
+ jest-get-type: "npm:^29.6.3"
+ jest-util: "npm:^29.7.0"
+ pretty-format: "npm:^29.7.0"
+ checksum: bd1a077654bdaa013b590deb5f7e7ade68f2e3289180a8c8f53bc8a49f3b40740c0ec2d3a3c1aee906f682775be2bebbac37491d80b634d15276b0aa0f2e3fda
languageName: node
linkType: hard
@@ -21749,31 +21438,17 @@ __metadata:
languageName: node
linkType: hard
-"jest-environment-node@npm:^28.0.0, jest-environment-node@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-environment-node@npm:28.1.3"
+"jest-environment-node@npm:^29.6.4, jest-environment-node@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-environment-node@npm:29.7.0"
dependencies:
- "@jest/environment": "npm:^28.1.3"
- "@jest/fake-timers": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
+ "@jest/environment": "npm:^29.7.0"
+ "@jest/fake-timers": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
- jest-mock: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- checksum: ab9ec5c57309a0ca40ebc58ba84b4980445f24d351cc3292c8c8715062c7ea14442d9d8e7701eccb9cb810f425bbdb7eba631fd76fb1835b92150b6bdda7cb18
- languageName: node
- linkType: hard
-
-"jest-environment-node@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-environment-node@npm:29.1.2"
- dependencies:
- "@jest/environment": "npm:^29.1.2"
- "@jest/fake-timers": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
- "@types/node": "npm:*"
- jest-mock: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- checksum: 0a7b7e0c764b925a29f9e54295f788df3fbe3d63ecdfc024b2eddedbccd06b0019aba1ec5898d9302036280669b1e5c584acbc52d38934c220362f94d90d86a4
+ jest-mock: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ checksum: 9cf7045adf2307cc93aed2f8488942e39388bff47ec1df149a997c6f714bfc66b2056768973770d3f8b1bf47396c19aa564877eb10ec978b952c6018ed1bd637
languageName: node
linkType: hard
@@ -21787,67 +21462,37 @@ __metadata:
languageName: node
linkType: hard
-"jest-get-type@npm:^28.0.2":
- version: 28.0.2
- resolution: "jest-get-type@npm:28.0.2"
- checksum: 5281d7c89bc8156605f6d15784f45074f4548501195c26e9b188742768f72d40948252d13230ea905b5349038865a1a8eeff0e614cc530ff289dfc41fe843abd
- languageName: node
- linkType: hard
-
-"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.4.3":
- version: 29.4.3
- resolution: "jest-get-type@npm:29.4.3"
- checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce
+"jest-get-type@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "jest-get-type@npm:29.6.3"
+ checksum: 88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205
languageName: node
linkType: hard
-"jest-haste-map@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-haste-map@npm:28.1.3"
+"jest-haste-map@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-haste-map@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
"@types/graceful-fs": "npm:^4.1.3"
"@types/node": "npm:*"
anymatch: "npm:^3.0.3"
fb-watchman: "npm:^2.0.0"
fsevents: "npm:^2.3.2"
graceful-fs: "npm:^4.2.9"
- jest-regex-util: "npm:^28.0.2"
- jest-util: "npm:^28.1.3"
- jest-worker: "npm:^28.1.3"
+ jest-regex-util: "npm:^29.6.3"
+ jest-util: "npm:^29.7.0"
+ jest-worker: "npm:^29.7.0"
micromatch: "npm:^4.0.4"
walker: "npm:^1.0.8"
dependenciesMeta:
fsevents:
optional: true
- checksum: c78e0e81e3f138f379440fb2ddfdc3753da377b74477df02ef404d5de1508d6545d28cf02516713dbde093a8c112098be6f50080a7a8fab6b888992720322a57
+ checksum: 8531b42003581cb18a69a2774e68c456fb5a5c3280b1b9b77475af9e346b6a457250f9d756bfeeae2fe6cbc9ef28434c205edab9390ee970a919baddfa08bb85
languageName: node
linkType: hard
-"jest-haste-map@npm:^29.1.2, jest-haste-map@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-haste-map@npm:29.6.2"
- dependencies:
- "@jest/types": "npm:^29.6.1"
- "@types/graceful-fs": "npm:^4.1.3"
- "@types/node": "npm:*"
- anymatch: "npm:^3.0.3"
- fb-watchman: "npm:^2.0.0"
- fsevents: "npm:^2.3.2"
- graceful-fs: "npm:^4.2.9"
- jest-regex-util: "npm:^29.4.3"
- jest-util: "npm:^29.6.2"
- jest-worker: "npm:^29.6.2"
- micromatch: "npm:^4.0.4"
- walker: "npm:^1.0.8"
- dependenciesMeta:
- fsevents:
- optional: true
- checksum: 855d2c94979ad0795d5ef31cc81ccf40d2c2f6abd63de34a89e8b12e6b1cf7b9ae875f7479b783b7a2e9f55502ad1d241d483c103bed85a75c2b10eaafea3634
- languageName: node
- linkType: hard
-
-"jest-junit@npm:^14.0.0, jest-junit@npm:^14.0.1":
+"jest-junit@npm:^14.0.1":
version: 14.0.1
resolution: "jest-junit@npm:14.0.1"
dependencies:
@@ -21859,108 +21504,71 @@ __metadata:
languageName: node
linkType: hard
-"jest-leak-detector@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-leak-detector@npm:28.1.3"
+"jest-junit@npm:^16.0.0":
+ version: 16.0.0
+ resolution: "jest-junit@npm:16.0.0"
dependencies:
- jest-get-type: "npm:^28.0.2"
- pretty-format: "npm:^28.1.3"
- checksum: 2e976a4880cf9af11f53a19f6a3820e0f90b635a900737a5427fc42e337d5628ba446dcd7c020ecea3806cf92bc0bbf6982ed62a9cd84e5a13d8751aa30fbbb7
- languageName: node
- linkType: hard
-
-"jest-leak-detector@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-leak-detector@npm:29.1.2"
- dependencies:
- jest-get-type: "npm:^29.0.0"
- pretty-format: "npm:^29.1.2"
- checksum: 5a2de24ba80473754f926cbe0ca6c0fec59fa01a6c9b184190b2ef93be8e9c4a8e1f81d3daf2b4fa142f103b140d8c339fab639195a033d6d644031f060641f9
+ mkdirp: "npm:^1.0.4"
+ strip-ansi: "npm:^6.0.1"
+ uuid: "npm:^8.3.2"
+ xml: "npm:^1.0.1"
+ checksum: 2c33ee8bfd0c83b9aa1f8ba5905084890d5f519d294ccc2829d778ac860d5adffffec75d930f44f1d498aa8370c783e0aa6a632d947fb7e81205f0e7b926669d
languageName: node
linkType: hard
-"jest-matcher-utils@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-matcher-utils@npm:28.1.3"
+"jest-leak-detector@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-leak-detector@npm:29.7.0"
dependencies:
- chalk: "npm:^4.0.0"
- jest-diff: "npm:^28.1.3"
- jest-get-type: "npm:^28.0.2"
- pretty-format: "npm:^28.1.3"
- checksum: 958f4bacdaee6949f1d1da413129f2249083bc6fa3f4ac5c559795b370aec7159f99f02340f706cc895b90938c2bafe1aab347c9a34f8819c59afd1a4cd6c009
+ jest-get-type: "npm:^29.6.3"
+ pretty-format: "npm:^29.7.0"
+ checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605
languageName: node
linkType: hard
-"jest-matcher-utils@npm:^29.1.2, jest-matcher-utils@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-matcher-utils@npm:29.6.2"
+"jest-matcher-utils@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-matcher-utils@npm:29.7.0"
dependencies:
chalk: "npm:^4.0.0"
- jest-diff: "npm:^29.6.2"
- jest-get-type: "npm:^29.4.3"
- pretty-format: "npm:^29.6.2"
- checksum: 38dc3f71620745054246fb31e1979587fb241d3a2ecea1f325dbcba6503653d7e2482c6deffa99d661b9da2f093c7713d6977fd2a6b8f57537875745049088ed
+ jest-diff: "npm:^29.7.0"
+ jest-get-type: "npm:^29.6.3"
+ pretty-format: "npm:^29.7.0"
+ checksum: 981904a494299cf1e3baed352f8a3bd8b50a8c13a662c509b6a53c31461f94ea3bfeffa9d5efcfeb248e384e318c87de7e3baa6af0f79674e987482aa189af40
languageName: node
linkType: hard
-"jest-message-util@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-message-util@npm:28.1.3"
+"jest-message-util@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-message-util@npm:29.7.0"
dependencies:
"@babel/code-frame": "npm:^7.12.13"
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
"@types/stack-utils": "npm:^2.0.0"
chalk: "npm:^4.0.0"
graceful-fs: "npm:^4.2.9"
micromatch: "npm:^4.0.4"
- pretty-format: "npm:^28.1.3"
+ pretty-format: "npm:^29.7.0"
slash: "npm:^3.0.0"
stack-utils: "npm:^2.0.3"
- checksum: 91137a507e9eb79ef6156a3d17c882a181fa662da28cc1a86245ff53ba13726653c8d5fed2660e922aae020a9caca4d22c3689bfe61a215c8a17a43e01b7eb5c
- languageName: node
- linkType: hard
-
-"jest-message-util@npm:^29.1.2, jest-message-util@npm:^29.5.0, jest-message-util@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-message-util@npm:29.6.2"
- dependencies:
- "@babel/code-frame": "npm:^7.12.13"
- "@jest/types": "npm:^29.6.1"
- "@types/stack-utils": "npm:^2.0.0"
- chalk: "npm:^4.0.0"
- graceful-fs: "npm:^4.2.9"
- micromatch: "npm:^4.0.4"
- pretty-format: "npm:^29.6.2"
- slash: "npm:^3.0.0"
- stack-utils: "npm:^2.0.3"
- checksum: a0e972367f12894dd0bcda2c2cd540607a6884315a411757b2e136eb54a53b54675f2e632b58a121e253bb456cfa564a9e10d5b7238b46de190095de78e445ba
- languageName: node
- linkType: hard
-
-"jest-mock@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-mock@npm:28.1.3"
- dependencies:
- "@jest/types": "npm:^28.1.3"
- "@types/node": "npm:*"
- checksum: 43cbec0ceddea795b8b2bc09f8632eecc97b88ef018a9c9737b887ed6cbdbda000a436e9165dce2bccfbb949be8b0daca6faa530dc390d43a0e5e3099f3ae216
+ checksum: 31d53c6ed22095d86bab9d14c0fa70c4a92c749ea6ceece82cf30c22c9c0e26407acdfbdb0231435dc85a98d6d65ca0d9cbcd25cd1abb377fe945e843fb770b9
languageName: node
linkType: hard
-"jest-mock@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-mock@npm:29.1.2"
+"jest-mock@npm:^29.1.2, jest-mock@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-mock@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^29.1.2"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
- jest-util: "npm:^29.1.2"
- checksum: 65416bd10447715fec7d45f886d9fc55603af034b31a2f6d593fc187d9d28511b23d9524d99b1998065fa892a8c7b229ce857783c567f5a2e4e74f809f13eb9c
+ jest-util: "npm:^29.7.0"
+ checksum: ae51d1b4f898724be5e0e52b2268a68fcd876d9b20633c864a6dd6b1994cbc48d62402b0f40f3a1b669b30ebd648821f086c26c08ffde192ced951ff4670d51c
languageName: node
linkType: hard
-"jest-playwright-preset@npm:^2.0.0":
- version: 2.0.0
- resolution: "jest-playwright-preset@npm:2.0.0"
+"jest-playwright-preset@npm:^3.0.1":
+ version: 3.0.1
+ resolution: "jest-playwright-preset@npm:3.0.1"
dependencies:
expect-playwright: "npm:^0.8.0"
jest-process-manager: "npm:^0.3.1"
@@ -21969,11 +21577,11 @@ __metadata:
rimraf: "npm:^3.0.2"
uuid: "npm:^8.3.2"
peerDependencies:
- jest: ^28.0.0
- jest-circus: ^28.0.0
- jest-environment-node: ^28.0.0
- jest-runner: ^28.0.0
- checksum: fe9bad513fe7338f3138b4a81f4aa6e327b16d577d25c622eb01bedc0b8275219eabca333d4d30a5cecf4cace35ea2336623464f7aee3d3e2801861ad88bcdab
+ jest: ^29.3.1
+ jest-circus: ^29.3.1
+ jest-environment-node: ^29.3.1
+ jest-runner: ^29.3.1
+ checksum: 66282d2eed8e49f6b66dbf2559a83a5b1e0b8e2b150444503f5aa87ee13744e9cdbf533d56d73a02acc1d407b57babf6c3bf31c490fa169607b01f926371c8de
languageName: node
linkType: hard
@@ -22007,189 +21615,96 @@ __metadata:
languageName: node
linkType: hard
-"jest-regex-util@npm:^28.0.2":
- version: 28.0.2
- resolution: "jest-regex-util@npm:28.0.2"
- checksum: 0ea8c5c82ec88bc85e273c0ec82e0c0f35f7a1e2d055070e50f0cc2a2177f848eec55f73e37ae0d045c3db5014c42b2f90ac62c1ab3fdb354d2abd66a9e08add
- languageName: node
- linkType: hard
-
-"jest-regex-util@npm:^29.0.0, jest-regex-util@npm:^29.4.3":
- version: 29.4.3
- resolution: "jest-regex-util@npm:29.4.3"
- checksum: 96fc7fc28cd4dd73a63c13a526202c4bd8b351d4e5b68b1a2a2c88da3308c2a16e26feaa593083eb0bac38cca1aa9dd05025412e7de013ba963fb8e66af22b8a
- languageName: node
- linkType: hard
-
-"jest-resolve-dependencies@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-resolve-dependencies@npm:28.1.3"
- dependencies:
- jest-regex-util: "npm:^28.0.2"
- jest-snapshot: "npm:^28.1.3"
- checksum: 5c3128ea5f702a22141116b6a3d83c594c192d3e17b7235a1d47ecd64bcd9aa4924100668804e6b54faf5a1437a366f37165a2ea7170a2ce35899323b4ed7aac
- languageName: node
- linkType: hard
-
-"jest-resolve-dependencies@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-resolve-dependencies@npm:29.1.2"
- dependencies:
- jest-regex-util: "npm:^29.0.0"
- jest-snapshot: "npm:^29.1.2"
- checksum: 3120152f5ef8931820a3dcbd17bb815a01c6de140694cf1877aeff09f3597ff85bdce86ab2e295cfbd3013b2961d08da786a5e94b1b9780091bb28cdd4be27b0
+"jest-regex-util@npm:^29.0.0, jest-regex-util@npm:^29.6.3":
+ version: 29.6.3
+ resolution: "jest-regex-util@npm:29.6.3"
+ checksum: 0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a
languageName: node
linkType: hard
-"jest-resolve@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-resolve@npm:28.1.3"
+"jest-resolve-dependencies@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-resolve-dependencies@npm:29.7.0"
dependencies:
- chalk: "npm:^4.0.0"
- graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^28.1.3"
- jest-pnp-resolver: "npm:^1.2.2"
- jest-util: "npm:^28.1.3"
- jest-validate: "npm:^28.1.3"
- resolve: "npm:^1.20.0"
- resolve.exports: "npm:^1.1.0"
- slash: "npm:^3.0.0"
- checksum: 742b2301a43172206bf88d405df73d19510cfd4eacb0fb16d620157de408e9f7399567a57c86c61b30aaa303c15d88a77b38a69ad0230d288e44db4d44d5f724
+ jest-regex-util: "npm:^29.6.3"
+ jest-snapshot: "npm:^29.7.0"
+ checksum: 1e206f94a660d81e977bcfb1baae6450cb4a81c92e06fad376cc5ea16b8e8c6ea78c383f39e95591a9eb7f925b6a1021086c38941aa7c1b8a6a813c2f6e93675
languageName: node
linkType: hard
-"jest-resolve@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-resolve@npm:29.1.2"
+"jest-resolve@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-resolve@npm:29.7.0"
dependencies:
chalk: "npm:^4.0.0"
graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^29.1.2"
+ jest-haste-map: "npm:^29.7.0"
jest-pnp-resolver: "npm:^1.2.2"
- jest-util: "npm:^29.1.2"
- jest-validate: "npm:^29.1.2"
+ jest-util: "npm:^29.7.0"
+ jest-validate: "npm:^29.7.0"
resolve: "npm:^1.20.0"
- resolve.exports: "npm:^1.1.0"
+ resolve.exports: "npm:^2.0.0"
slash: "npm:^3.0.0"
- checksum: 4d5e9373de52577c524f74c035a280771ff97a4977ac7fad91871d7dc7e5c82defb5493470a7060d67722347aeb161180ce09d9a82fc72127ff1f5ab7841ea17
+ checksum: faa466fd9bc69ea6c37a545a7c6e808e073c66f46ab7d3d8a6ef084f8708f201b85d5fe1799789578b8b47fa1de47b9ee47b414d1863bc117a49e032ba77b7c7
languageName: node
linkType: hard
-"jest-runner@npm:^28.0.0, jest-runner@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-runner@npm:28.1.3"
- dependencies:
- "@jest/console": "npm:^28.1.3"
- "@jest/environment": "npm:^28.1.3"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/transform": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- "@types/node": "npm:*"
- chalk: "npm:^4.0.0"
- emittery: "npm:^0.10.2"
- graceful-fs: "npm:^4.2.9"
- jest-docblock: "npm:^28.1.1"
- jest-environment-node: "npm:^28.1.3"
- jest-haste-map: "npm:^28.1.3"
- jest-leak-detector: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-resolve: "npm:^28.1.3"
- jest-runtime: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- jest-watcher: "npm:^28.1.3"
- jest-worker: "npm:^28.1.3"
- p-limit: "npm:^3.1.0"
- source-map-support: "npm:0.5.13"
- checksum: 0fb6ed4f628650da9ff502b89bfdf98ea7f3015ad0369429c223ddae793573d9c5f350e95756e8bb827e2e6e3de03e5cb94569075c5788e574697b63c09d80ae
- languageName: node
- linkType: hard
-
-"jest-runner@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-runner@npm:29.1.2"
+"jest-runner@npm:^29.6.4, jest-runner@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-runner@npm:29.7.0"
dependencies:
- "@jest/console": "npm:^29.1.2"
- "@jest/environment": "npm:^29.1.2"
- "@jest/test-result": "npm:^29.1.2"
- "@jest/transform": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
+ "@jest/console": "npm:^29.7.0"
+ "@jest/environment": "npm:^29.7.0"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/transform": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
- emittery: "npm:^0.10.2"
+ emittery: "npm:^0.13.1"
graceful-fs: "npm:^4.2.9"
- jest-docblock: "npm:^29.0.0"
- jest-environment-node: "npm:^29.1.2"
- jest-haste-map: "npm:^29.1.2"
- jest-leak-detector: "npm:^29.1.2"
- jest-message-util: "npm:^29.1.2"
- jest-resolve: "npm:^29.1.2"
- jest-runtime: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
- jest-watcher: "npm:^29.1.2"
- jest-worker: "npm:^29.1.2"
+ jest-docblock: "npm:^29.7.0"
+ jest-environment-node: "npm:^29.7.0"
+ jest-haste-map: "npm:^29.7.0"
+ jest-leak-detector: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-resolve: "npm:^29.7.0"
+ jest-runtime: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
+ jest-watcher: "npm:^29.7.0"
+ jest-worker: "npm:^29.7.0"
p-limit: "npm:^3.1.0"
source-map-support: "npm:0.5.13"
- checksum: 3810efbae4f8335a8f49e6c82aa08790d9159020e7b19735c9a7996905fe6fe776f077c06c66c02877768aab93b3bb19817351aadc95ea0bd60882d366658a46
+ checksum: 9d8748a494bd90f5c82acea99be9e99f21358263ce6feae44d3f1b0cd90991b5df5d18d607e73c07be95861ee86d1cbab2a3fc6ca4b21805f07ac29d47c1da1e
languageName: node
linkType: hard
-"jest-runtime@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-runtime@npm:28.1.3"
+"jest-runtime@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-runtime@npm:29.7.0"
dependencies:
- "@jest/environment": "npm:^28.1.3"
- "@jest/fake-timers": "npm:^28.1.3"
- "@jest/globals": "npm:^28.1.3"
- "@jest/source-map": "npm:^28.1.2"
- "@jest/test-result": "npm:^28.1.3"
- "@jest/transform": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- chalk: "npm:^4.0.0"
- cjs-module-lexer: "npm:^1.0.0"
- collect-v8-coverage: "npm:^1.0.0"
- execa: "npm:^5.0.0"
- glob: "npm:^7.1.3"
- graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-mock: "npm:^28.1.3"
- jest-regex-util: "npm:^28.0.2"
- jest-resolve: "npm:^28.1.3"
- jest-snapshot: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- slash: "npm:^3.0.0"
- strip-bom: "npm:^4.0.0"
- checksum: d3d91b3f1082bbe3f87dc11ad7abce12f323797d98b3fa5ef7fb5efbd6d30e42041e3732cb8be5d41f0c8d8312d14461381d829ed1fe4e3712cfc82ea4a586fc
- languageName: node
- linkType: hard
-
-"jest-runtime@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-runtime@npm:29.1.2"
- dependencies:
- "@jest/environment": "npm:^29.1.2"
- "@jest/fake-timers": "npm:^29.1.2"
- "@jest/globals": "npm:^29.1.2"
- "@jest/source-map": "npm:^29.0.0"
- "@jest/test-result": "npm:^29.1.2"
- "@jest/transform": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
+ "@jest/environment": "npm:^29.7.0"
+ "@jest/fake-timers": "npm:^29.7.0"
+ "@jest/globals": "npm:^29.7.0"
+ "@jest/source-map": "npm:^29.6.3"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/transform": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
cjs-module-lexer: "npm:^1.0.0"
collect-v8-coverage: "npm:^1.0.0"
glob: "npm:^7.1.3"
graceful-fs: "npm:^4.2.9"
- jest-haste-map: "npm:^29.1.2"
- jest-message-util: "npm:^29.1.2"
- jest-mock: "npm:^29.1.2"
- jest-regex-util: "npm:^29.0.0"
- jest-resolve: "npm:^29.1.2"
- jest-snapshot: "npm:^29.1.2"
- jest-util: "npm:^29.1.2"
+ jest-haste-map: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-mock: "npm:^29.7.0"
+ jest-regex-util: "npm:^29.6.3"
+ jest-resolve: "npm:^29.7.0"
+ jest-snapshot: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
slash: "npm:^3.0.0"
strip-bom: "npm:^4.0.0"
- checksum: b8c0ac703f88483485c026e3d14370cf0915b81caf250098a600427d84b4f94787dd6e5b522b7ad3d65a7a16aeb207448c313579f8b7258a8ace8f9cbfdc3ea9
+ checksum: 59eb58eb7e150e0834a2d0c0d94f2a0b963ae7182cfa6c63f2b49b9c6ef794e5193ef1634e01db41420c36a94cefc512cdd67a055cd3e6fa2f41eaf0f82f5a20
languageName: node
linkType: hard
@@ -22202,118 +21717,59 @@ __metadata:
languageName: node
linkType: hard
-"jest-snapshot@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-snapshot@npm:28.1.3"
- dependencies:
- "@babel/core": "npm:^7.11.6"
- "@babel/generator": "npm:^7.7.2"
- "@babel/plugin-syntax-typescript": "npm:^7.7.2"
- "@babel/traverse": "npm:^7.7.2"
- "@babel/types": "npm:^7.3.3"
- "@jest/expect-utils": "npm:^28.1.3"
- "@jest/transform": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- "@types/babel__traverse": "npm:^7.0.6"
- "@types/prettier": "npm:^2.1.5"
- babel-preset-current-node-syntax: "npm:^1.0.0"
- chalk: "npm:^4.0.0"
- expect: "npm:^28.1.3"
- graceful-fs: "npm:^4.2.9"
- jest-diff: "npm:^28.1.3"
- jest-get-type: "npm:^28.0.2"
- jest-haste-map: "npm:^28.1.3"
- jest-matcher-utils: "npm:^28.1.3"
- jest-message-util: "npm:^28.1.3"
- jest-util: "npm:^28.1.3"
- natural-compare: "npm:^1.4.0"
- pretty-format: "npm:^28.1.3"
- semver: "npm:^7.3.5"
- checksum: 4e1f4e2aa5ccc776f1fdaab75f96342534f737df0d43458e0614af362f7e80097909f69e5d8f2d0aed2caae07fa122b1cf7b8da0c97c44c3b2d06da472d7ad79
- languageName: node
- linkType: hard
-
-"jest-snapshot@npm:^29.1.2, jest-snapshot@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-snapshot@npm:29.6.2"
+"jest-snapshot@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-snapshot@npm:29.7.0"
dependencies:
"@babel/core": "npm:^7.11.6"
"@babel/generator": "npm:^7.7.2"
"@babel/plugin-syntax-jsx": "npm:^7.7.2"
"@babel/plugin-syntax-typescript": "npm:^7.7.2"
"@babel/types": "npm:^7.3.3"
- "@jest/expect-utils": "npm:^29.6.2"
- "@jest/transform": "npm:^29.6.2"
- "@jest/types": "npm:^29.6.1"
+ "@jest/expect-utils": "npm:^29.7.0"
+ "@jest/transform": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
babel-preset-current-node-syntax: "npm:^1.0.0"
chalk: "npm:^4.0.0"
- expect: "npm:^29.6.2"
+ expect: "npm:^29.7.0"
graceful-fs: "npm:^4.2.9"
- jest-diff: "npm:^29.6.2"
- jest-get-type: "npm:^29.4.3"
- jest-matcher-utils: "npm:^29.6.2"
- jest-message-util: "npm:^29.6.2"
- jest-util: "npm:^29.6.2"
+ jest-diff: "npm:^29.7.0"
+ jest-get-type: "npm:^29.6.3"
+ jest-matcher-utils: "npm:^29.7.0"
+ jest-message-util: "npm:^29.7.0"
+ jest-util: "npm:^29.7.0"
natural-compare: "npm:^1.4.0"
- pretty-format: "npm:^29.6.2"
+ pretty-format: "npm:^29.7.0"
semver: "npm:^7.5.3"
- checksum: d9412eeea378ba070b9a67a161bb65b1b1038106dce8849c9e8266d4688dc8739063c9acd2d011f02f0f2cce2ff4e709be89c0657b03b89150fe7bdae769ec1c
+ checksum: cb19a3948256de5f922d52f251821f99657339969bf86843bd26cf3332eae94883e8260e3d2fba46129a27c3971c1aa522490e460e16c7fad516e82d10bbf9f8
languageName: node
linkType: hard
-"jest-util@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-util@npm:28.1.3"
+"jest-util@npm:^29.1.2, jest-util@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-util@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
chalk: "npm:^4.0.0"
ci-info: "npm:^3.2.0"
graceful-fs: "npm:^4.2.9"
picomatch: "npm:^2.2.3"
- checksum: 92895523d30ddde8f22bebbc20ed6e1be35b0a21c8e9df8a1fc289bf354f6a3f96e5d271340f2ed212a5aa0b55fd7717ff3167da8c5f247d623e2a93a3bf7b32
+ checksum: 30d58af6967e7d42bd903ccc098f3b4d3859ed46238fbc88d4add6a3f10bea00c226b93660285f058bc7a65f6f9529cf4eb80f8d4707f79f9e3a23686b4ab8f3
languageName: node
linkType: hard
-"jest-util@npm:^29.1.2, jest-util@npm:^29.3.1, jest-util@npm:^29.5.0, jest-util@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-util@npm:29.6.2"
+"jest-validate@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-validate@npm:29.7.0"
dependencies:
- "@jest/types": "npm:^29.6.1"
- "@types/node": "npm:*"
- chalk: "npm:^4.0.0"
- ci-info: "npm:^3.2.0"
- graceful-fs: "npm:^4.2.9"
- picomatch: "npm:^2.2.3"
- checksum: 95d510b7bbac6976c71bf9c8f2e861cdc6c47dca0a70c470ebce6fa2afef3fecd73772efdffc04e7aad89602ab388c2f1ee1cb27c505210d767f0731da65c13b
- languageName: node
- linkType: hard
-
-"jest-validate@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-validate@npm:28.1.3"
- dependencies:
- "@jest/types": "npm:^28.1.3"
+ "@jest/types": "npm:^29.6.3"
camelcase: "npm:^6.2.0"
chalk: "npm:^4.0.0"
- jest-get-type: "npm:^28.0.2"
+ jest-get-type: "npm:^29.6.3"
leven: "npm:^3.1.0"
- pretty-format: "npm:^28.1.3"
- checksum: c49c8c64b4afbfb5c7434cfd30f8adbe7c6f57ce3ad6be55cfd65403f9ae664822badc1f27844ae800b23c84653bea834e928ad79e18ea0afdc4aa2d0a121156
- languageName: node
- linkType: hard
-
-"jest-validate@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest-validate@npm:29.1.2"
- dependencies:
- "@jest/types": "npm:^29.1.2"
- camelcase: "npm:^6.2.0"
- chalk: "npm:^4.0.0"
- jest-get-type: "npm:^29.0.0"
- leven: "npm:^3.1.0"
- pretty-format: "npm:^29.1.2"
- checksum: f2f6e73077fbe6714aaa5a33f2ea7e299debd52782941d3572f25458148a9a305d508b5a22882cb3203380ca31eb54ea02e08b1d6cd5d54bde7dd89cb46134b4
+ pretty-format: "npm:^29.7.0"
+ checksum: 8ee1163666d8eaa16d90a989edba2b4a3c8ab0ffaa95ad91b08ca42b015bfb70e164b247a5b17f9de32d096987cada63ed8491ab82761bfb9a28bc34b27ae161
languageName: node
linkType: hard
@@ -22334,35 +21790,19 @@ __metadata:
languageName: node
linkType: hard
-"jest-watcher@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-watcher@npm:28.1.3"
+"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-watcher@npm:29.7.0"
dependencies:
- "@jest/test-result": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- "@types/node": "npm:*"
- ansi-escapes: "npm:^4.2.1"
- chalk: "npm:^4.0.0"
- emittery: "npm:^0.10.2"
- jest-util: "npm:^28.1.3"
- string-length: "npm:^4.0.1"
- checksum: e6d2c099d461408a992d144c230112fb282b2d8f54c49227bdb0c3efcfa5ecab70a019fc57d8ad6360000459087bb942c4f72670b52fc5b97ac0d9834f87d24e
- languageName: node
- linkType: hard
-
-"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.1.2":
- version: 29.3.1
- resolution: "jest-watcher@npm:29.3.1"
- dependencies:
- "@jest/test-result": "npm:^29.3.1"
- "@jest/types": "npm:^29.3.1"
+ "@jest/test-result": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
"@types/node": "npm:*"
ansi-escapes: "npm:^4.2.1"
chalk: "npm:^4.0.0"
emittery: "npm:^0.13.1"
- jest-util: "npm:^29.3.1"
+ jest-util: "npm:^29.7.0"
string-length: "npm:^4.0.1"
- checksum: ee173276fe087da05bc13a36d1e4bd07713cc9560e0daa9433864620e8bb45abd7eca6ab0376f6d2bec49e40efa7c55a05ca4c8fba4e445981130ff6ff223d60
+ checksum: 4f616e0345676631a7034b1d94971aaa719f0cd4a6041be2aa299be437ea047afd4fe05c48873b7963f5687a2f6c7cbf51244be8b14e313b97bfe32b1e127e55
languageName: node
linkType: hard
@@ -22377,56 +21817,26 @@ __metadata:
languageName: node
linkType: hard
-"jest-worker@npm:^28.1.3":
- version: 28.1.3
- resolution: "jest-worker@npm:28.1.3"
+"jest-worker@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "jest-worker@npm:29.7.0"
dependencies:
"@types/node": "npm:*"
+ jest-util: "npm:^29.7.0"
merge-stream: "npm:^2.0.0"
supports-color: "npm:^8.0.0"
- checksum: 0b5992308276ac8440a789e5317ff8feaa496cd9a0512c9cd73dbb9b6d2ff81b717cef1aa20113633c7280c9e29319af00a4d53d6bb35adbd1e3c01f0c290152
- languageName: node
- linkType: hard
-
-"jest-worker@npm:^29.1.2, jest-worker@npm:^29.5.0, jest-worker@npm:^29.6.2":
- version: 29.6.2
- resolution: "jest-worker@npm:29.6.2"
- dependencies:
- "@types/node": "npm:*"
- jest-util: "npm:^29.6.2"
- merge-stream: "npm:^2.0.0"
- supports-color: "npm:^8.0.0"
- checksum: 7564896d0e61fdd202652c1ce17e1c20ef01dcbf313471dd83e687efa424e82745cc4d7ebf19ba8342327fa62971107c0e507a654e0041f310b4d53bee82584f
- languageName: node
- linkType: hard
-
-"jest@npm:^28.0.0":
- version: 28.1.3
- resolution: "jest@npm:28.1.3"
- dependencies:
- "@jest/core": "npm:^28.1.3"
- "@jest/types": "npm:^28.1.3"
- import-local: "npm:^3.0.2"
- jest-cli: "npm:^28.1.3"
- peerDependencies:
- node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
- peerDependenciesMeta:
- node-notifier:
- optional: true
- bin:
- jest: bin/jest.js
- checksum: fb7c93e8a9d4c760a59e2b7638886f9f05465a14a88e263dca448f205464434967897a89784a37f7623999dfc33206d3d61d0acdc83eed99c4474d84a4ed3cf8
+ checksum: 364cbaef00d8a2729fc760227ad34b5e60829e0869bd84976bdfbd8c0d0f9c2f22677b3e6dd8afa76ed174765351cd12bae3d4530c62eefb3791055127ca9745
languageName: node
linkType: hard
-"jest@npm:^29.1.2":
- version: 29.1.2
- resolution: "jest@npm:29.1.2"
+"jest@npm:^29.1.2, jest@npm:^29.6.4":
+ version: 29.7.0
+ resolution: "jest@npm:29.7.0"
dependencies:
- "@jest/core": "npm:^29.1.2"
- "@jest/types": "npm:^29.1.2"
+ "@jest/core": "npm:^29.7.0"
+ "@jest/types": "npm:^29.6.3"
import-local: "npm:^3.0.2"
- jest-cli: "npm:^29.1.2"
+ jest-cli: "npm:^29.7.0"
peerDependencies:
node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
peerDependenciesMeta:
@@ -22434,7 +21844,7 @@ __metadata:
optional: true
bin:
jest: bin/jest.js
- checksum: c155338fc006f8b1f424b436f00fc01af0bb96149d36b4048a33da616724bed870494ce9b1ffc9373571cee21de1f51228898740ab3dc77489c674891119f287
+ checksum: 97023d78446098c586faaa467fbf2c6b07ff06e2c85a19e3926adb5b0effe9ac60c4913ae03e2719f9c01ae8ffd8d92f6b262cedb9555ceeb5d19263d8c6362a
languageName: node
linkType: hard
@@ -22472,27 +21882,6 @@ __metadata:
languageName: node
linkType: hard
-"js-sha3@npm:0.5.5":
- version: 0.5.5
- resolution: "js-sha3@npm:0.5.5"
- checksum: 9ce8bfabdba2cfb94b911125fc278e2f46cc01b6590c98833d9361199e2c2b4bca0427d04da6aa083f05c2c3982029200964a3d6e417b0c126c80f2e32c2d5eb
- languageName: node
- linkType: hard
-
-"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0":
- version: 0.8.0
- resolution: "js-sha3@npm:0.8.0"
- checksum: a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c
- languageName: node
- linkType: hard
-
-"js-sha3@npm:^0.5.7":
- version: 0.5.7
- resolution: "js-sha3@npm:0.5.7"
- checksum: 32885c7edb50fca04017bacada8e5315c072d21d3d35e071e9640fc5577e200076a4718e0b2f33d86ab704accb68d2ade44f1e2ca424cc73a5929b9129dab948
- languageName: node
- linkType: hard
-
"js-sha3@npm:^0.9.2":
version: 0.9.3
resolution: "js-sha3@npm:0.9.3"
@@ -22759,16 +22148,6 @@ __metadata:
languageName: node
linkType: hard
-"json-rpc-middleware-stream@npm:^4.2.1":
- version: 4.2.1
- resolution: "json-rpc-middleware-stream@npm:4.2.1"
- dependencies:
- "@metamask/safe-event-emitter": "npm:^2.0.0"
- readable-stream: "npm:^2.3.3"
- checksum: 7cf1b521cb2dd24fc06a38f80960aa0bd53e020b955feb92119a64831986be474ba695bfa4851ed0bf9e7828a07b49f70fdc38a58bc2c62502abe874d4acff6c
- languageName: node
- linkType: hard
-
"json-rpc-middleware-stream@npm:^5.0.0, json-rpc-middleware-stream@npm:^5.0.1":
version: 5.0.1
resolution: "json-rpc-middleware-stream@npm:5.0.1"
@@ -22854,6 +22233,13 @@ __metadata:
languageName: node
linkType: hard
+"jsonc-parser@npm:^3.2.0":
+ version: 3.2.0
+ resolution: "jsonc-parser@npm:3.2.0"
+ checksum: bd68b902e5f9394f01da97921f49c5084b2dc03a0c5b4fdb2a429f8d6f292686c1bf87badaeb0a8148d024192a88f5ad2e57b2918ba43fe25cf15f3371db64d4
+ languageName: node
+ linkType: hard
+
"jsonfile@npm:^4.0.0":
version: 4.0.0
resolution: "jsonfile@npm:4.0.0"
@@ -24597,6 +23983,8 @@ __metadata:
"@keystonehq/bc-ur-registry-eth": "npm:^0.19.1"
"@keystonehq/metamask-airgapped-keyring": "npm:^0.13.1"
"@lavamoat/allow-scripts": "npm:^3.0.1"
+ "@lavamoat/lavadome-core": "npm:0.0.10"
+ "@lavamoat/lavadome-react": "npm:0.0.10"
"@lavamoat/lavapack": "npm:^6.0.2"
"@lavamoat/snow": "npm:^2.0.1"
"@material-ui/core": "npm:^4.11.0"
@@ -24608,18 +23996,18 @@ __metadata:
"@metamask-institutional/rpc-allowlist": "npm:^1.0.0"
"@metamask-institutional/sdk": "npm:^0.1.23"
"@metamask-institutional/transaction-update": "npm:^0.1.32"
- "@metamask/accounts-controller": "patch:@metamask/accounts-controller@npm%3A5.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-5.0.0-f877105fa0.patch"
+ "@metamask/accounts-controller": "patch:@metamask/accounts-controller@npm%3A10.0.0#~/.yarn/patches/@metamask-accounts-controller-npm-10.0.0-247993ca9a.patch"
"@metamask/address-book-controller": "npm:^3.0.0"
"@metamask/announcement-controller": "npm:^5.0.1"
"@metamask/approval-controller": "npm:^5.1.1"
"@metamask/assets-controllers": "npm:^24.0.0"
"@metamask/auto-changelog": "npm:^2.1.0"
- "@metamask/base-controller": "npm:^4.0.0"
+ "@metamask/base-controller": "npm:^4.1.0"
"@metamask/browser-passworder": "npm:^4.3.0"
"@metamask/build-utils": "npm:^1.0.0"
"@metamask/contract-metadata": "npm:^2.3.1"
"@metamask/controller-utils": "npm:^8.0.1"
- "@metamask/design-tokens": "npm:^1.12.0"
+ "@metamask/design-tokens": "npm:^1.13.0"
"@metamask/desktop": "npm:^0.3.0"
"@metamask/eslint-config": "npm:^9.0.0"
"@metamask/eslint-config-jest": "npm:^9.0.0"
@@ -24640,13 +24028,13 @@ __metadata:
"@metamask/forwarder": "npm:^1.1.0"
"@metamask/gas-fee-controller": "npm:^12.0.0"
"@metamask/jazzicon": "npm:^2.0.0"
- "@metamask/keyring-api": "npm:^1.0.0"
+ "@metamask/keyring-api": "npm:^3.0.0"
"@metamask/keyring-controller": "patch:@metamask/keyring-controller@npm%3A9.0.0#~/.yarn/patches/@metamask-keyring-controller-npm-9.0.0-f57ed3ebea.patch"
"@metamask/logging-controller": "npm:^1.0.1"
"@metamask/logo": "npm:^3.1.2"
"@metamask/message-manager": "npm:^7.3.0"
"@metamask/metamask-eth-abis": "npm:^3.0.0"
- "@metamask/name-controller": "npm:^4.0.0"
+ "@metamask/name-controller": "npm:^4.2.0"
"@metamask/network-controller": "npm:^17.1.0"
"@metamask/notification-controller": "npm:^3.0.0"
"@metamask/obs-store": "npm:^8.1.0"
@@ -24655,7 +24043,7 @@ __metadata:
"@metamask/phishing-warning": "npm:^3.0.3"
"@metamask/polling-controller": "npm:^4.0.0"
"@metamask/post-message-stream": "npm:^7.0.0"
- "@metamask/ppom-validator": "npm:^0.10.0"
+ "@metamask/ppom-validator": "npm:^0.22.0"
"@metamask/providers": "npm:^14.0.2"
"@metamask/queued-request-controller": "npm:^0.3.0"
"@metamask/rate-limit-controller": "npm:^3.0.0"
@@ -24669,7 +24057,7 @@ __metadata:
"@metamask/snaps-sdk": "npm:^1.4.0"
"@metamask/snaps-utils": "npm:^5.2.0"
"@metamask/test-dapp": "npm:^7.3.1"
- "@metamask/transaction-controller": "npm:^20.0.0"
+ "@metamask/transaction-controller": "npm:^21.1.0"
"@metamask/user-operation-controller": "npm:^1.0.0"
"@metamask/utils": "npm:^8.2.1"
"@ngraveio/bc-ur": "npm:^1.1.6"
@@ -24697,7 +24085,7 @@ __metadata:
"@storybook/react": "npm:^7.4.6"
"@storybook/react-webpack5": "npm:^7.4.6"
"@storybook/storybook-deployer": "npm:^2.8.16"
- "@storybook/test-runner": "npm:^0.10.0"
+ "@storybook/test-runner": "npm:^0.14.1"
"@storybook/theming": "npm:^7.4.6"
"@testing-library/jest-dom": "npm:^5.11.10"
"@testing-library/react": "npm:^10.4.8"
@@ -24717,7 +24105,7 @@ __metadata:
"@types/jest": "npm:^29.1.2"
"@types/madge": "npm:^5.0.0"
"@types/mocha": "npm:^10.0.3"
- "@types/node": "npm:^18"
+ "@types/node": "npm:^20"
"@types/pify": "npm:^5.0.1"
"@types/pump": "npm:^1.1.1"
"@types/react": "npm:^16.9.53"
@@ -24899,6 +24287,7 @@ __metadata:
semver: "npm:^7.5.4"
serve-handler: "npm:^6.1.2"
ses: "npm:^1.1.0"
+ simple-git: "npm:^3.20.0"
single-call-balance-checker-abi: "npm:^1.0.0"
sinon: "npm:^9.0.0"
source-map: "npm:^0.7.4"
@@ -25955,16 +25344,6 @@ __metadata:
languageName: node
linkType: hard
-"multibase@npm:^3.0.0":
- version: 3.1.2
- resolution: "multibase@npm:3.1.2"
- dependencies:
- "@multiformats/base-x": "npm:^4.0.1"
- web-encoding: "npm:^1.0.6"
- checksum: 92d1dd2dcf63d9a54027ca1aa2d06160765d1457bb207e30e9c9bf5c8d111eab5014c858ec30bcb99b38cb16244919bd93c9b881e90765a1e462c8fac8413d0e
- languageName: node
- linkType: hard
-
"multibase@npm:^4.0.1":
version: 4.0.4
resolution: "multibase@npm:4.0.4"
@@ -25974,30 +25353,20 @@ __metadata:
languageName: node
linkType: hard
-"multicodec@npm:^2.1.0":
- version: 2.1.3
- resolution: "multicodec@npm:2.1.3"
- dependencies:
- uint8arrays: "npm:1.1.0"
- varint: "npm:^6.0.0"
- checksum: dbf149d0c44b9dd5a354cacd5d7743326e9972744715c349e4a32cc0b048d90df847e850acd9b118d4b986bc85ddf3e8d481ac75aafa8df596d75df873e459ff
- languageName: node
- linkType: hard
-
-"multicodec@npm:^3.0.1":
- version: 3.1.0
- resolution: "multicodec@npm:3.1.0"
+"multicodec@npm:^3.0.1, multicodec@npm:^3.2.0":
+ version: 3.2.1
+ resolution: "multicodec@npm:3.2.1"
dependencies:
- uint8arrays: "npm:^2.1.5"
+ uint8arrays: "npm:^3.0.0"
varint: "npm:^6.0.0"
- checksum: d8a593c6ed5a46ea0e39255a9ad12459b05e36a0a96db7e2773770b9d3e16120f6708b4c9b5b727f1c7f6b8ab1582f78a323736f40caf9051df5966ec884c623
+ checksum: 5a2f4418ec8b45e623b745e96a4e4b6e1cf6538f8cda8b6139c9b0fdf385db3b59c5e99e28ca5af144cb0953df0d567a86e781783446e32a654313e2ac746f0f
languageName: node
linkType: hard
-"multiformats@npm:^9.5.2":
- version: 9.5.2
- resolution: "multiformats@npm:9.5.2"
- checksum: 2cac9c251c7d7e1d8a6d9db6025c5c9adfbc39c0bb3cb6f2a2f7ebce959bf1c529b73895d620bcb655da65ede8c5ce3596c401330938436877eed4ae53e88d32
+"multiformats@npm:^9.4.2, multiformats@npm:^9.5.2":
+ version: 9.9.0
+ resolution: "multiformats@npm:9.9.0"
+ checksum: ad55c7d480d22f4258a68fd88aa2aab744fe0cb1e68d732fc886f67d858b37e3aa6c2cec12b2960ead7730d43be690931485238569952d8a3d7f90fdc726c652
languageName: node
linkType: hard
@@ -28344,26 +27713,14 @@ __metadata:
languageName: node
linkType: hard
-"pretty-format@npm:^28.1.3":
- version: 28.1.3
- resolution: "pretty-format@npm:28.1.3"
+"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0":
+ version: 29.7.0
+ resolution: "pretty-format@npm:29.7.0"
dependencies:
- "@jest/schemas": "npm:^28.1.3"
- ansi-regex: "npm:^5.0.1"
+ "@jest/schemas": "npm:^29.6.3"
ansi-styles: "npm:^5.0.0"
react-is: "npm:^18.0.0"
- checksum: 26626d33e201388174a1ce352be46b8087f28184bf3684a88b2f7cf633e28419ffc664628eec261ba13b0f03748c3a6f85db063a2022f75a354c7b9e4e06526b
- languageName: node
- linkType: hard
-
-"pretty-format@npm:^29.0.0, pretty-format@npm:^29.1.2, pretty-format@npm:^29.6.2":
- version: 29.6.2
- resolution: "pretty-format@npm:29.6.2"
- dependencies:
- "@jest/schemas": "npm:^29.6.0"
- ansi-styles: "npm:^5.0.0"
- react-is: "npm:^18.0.0"
- checksum: 5db1faf52552341e5026fd72f847d88116b08f758ef904f1635415b53ec2a193a0114fdede9f55a2c1174fa6eca896531f860db6f208c5698a52a5c354bb6f8d
+ checksum: dea96bc83c83cd91b2bfc55757b6b2747edcaac45b568e46de29deee80742f17bc76fe8898135a70d904f4928eafd8bb693cd1da4896e8bdd3c5e82cadf1d2bb
languageName: node
linkType: hard
@@ -28688,6 +28045,13 @@ __metadata:
languageName: node
linkType: hard
+"pure-rand@npm:^6.0.0":
+ version: 6.0.4
+ resolution: "pure-rand@npm:6.0.4"
+ checksum: 34fed0abe99d3db7ddc459c12e1eda6bff05db6a17f2017a1ae12202271ccf276fb223b442653518c719671c1b339bbf97f27ba9276dba0997c89e45c4e6a3bf
+ languageName: node
+ linkType: hard
+
"pushdata-bitcoin@npm:^1.0.1":
version: 1.0.1
resolution: "pushdata-bitcoin@npm:1.0.1"
@@ -29818,13 +29182,6 @@ __metadata:
languageName: node
linkType: hard
-"regenerator-runtime@npm:^0.13.9":
- version: 0.13.11
- resolution: "regenerator-runtime@npm:0.13.11"
- checksum: d493e9e118abef5b099c78170834f18540c4933cedf9bfabc32d3af94abfb59a7907bd7950259cbab0a929ebca7db77301e8024e5121e6482a82f78283dfd20c
- languageName: node
- linkType: hard
-
"regenerator-runtime@npm:^0.14.0":
version: 0.14.0
resolution: "regenerator-runtime@npm:0.14.0"
@@ -30355,6 +29712,13 @@ __metadata:
languageName: node
linkType: hard
+"resolve-pkg-maps@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "resolve-pkg-maps@npm:1.0.0"
+ checksum: 0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e
+ languageName: node
+ linkType: hard
+
"resolve-url-loader@npm:^3.1.5":
version: 3.1.5
resolution: "resolve-url-loader@npm:3.1.5"
@@ -30380,14 +29744,14 @@ __metadata:
languageName: node
linkType: hard
-"resolve.exports@npm:^1.1.0":
- version: 1.1.0
- resolution: "resolve.exports@npm:1.1.0"
- checksum: 6286de22854041ee4705bdb71bc883c70e512b03f0d87761dcb767221f6f3ca5323ec7e57df88a2269f8f9e28d8cdce39f6da5b49885ba3f8052d6ac0d79db19
+"resolve.exports@npm:^2.0.0":
+ version: 2.0.2
+ resolution: "resolve.exports@npm:2.0.2"
+ checksum: f1cc0b6680f9a7e0345d783e0547f2a5110d8336b3c2a4227231dd007271ffd331fd722df934f017af90bae0373920ca0d4005da6f76cb3176c8ae426370f893
languageName: node
linkType: hard
-"resolve@npm:1.22.8, resolve@npm:^1.1.4, resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.11.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.18.1, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.0, resolve@npm:^1.22.3, resolve@npm:^1.4.0":
+"resolve@npm:1.22.8, resolve@npm:^1.1.4, resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.11.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.18.1, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.4.0":
version: 1.22.8
resolution: "resolve@npm:1.22.8"
dependencies:
@@ -30413,7 +29777,7 @@ __metadata:
languageName: node
linkType: hard
-? "resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.1.4#optional!builtin, resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.11.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.18.1#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.21.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin"
+? "resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.1.4#optional!builtin, resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.11.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.18.1#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.21.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin"
:
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d"
@@ -31136,15 +30500,6 @@ __metadata:
languageName: node
linkType: hard
-"ses@npm:^0.18.8":
- version: 0.18.8
- resolution: "ses@npm:0.18.8"
- dependencies:
- "@endo/env-options": "npm:^0.1.4"
- checksum: 243b8d546ca2f0ad68cda1178689c4a4bfab8ac25fd03daccaf6c4b94ee0c10b07eb10b8d477c73ceef9ba10a2205d2bef0bd3c64b8c98130c01adfd9c873103
- languageName: node
- linkType: hard
-
"ses@npm:^1.1.0":
version: 1.1.0
resolution: "ses@npm:1.1.0"
@@ -31345,6 +30700,17 @@ __metadata:
languageName: node
linkType: hard
+"simple-git@npm:^3.20.0":
+ version: 3.20.0
+ resolution: "simple-git@npm:3.20.0"
+ dependencies:
+ "@kwsites/file-exists": "npm:^1.1.1"
+ "@kwsites/promise-deferred": "npm:^1.1.1"
+ debug: "npm:^4.3.4"
+ checksum: fabfdbabfec8c7a7484d22d0218fb4ff9c8acdecaadc34c4655cd10f2aacd40bd656284abdf1613831b692d7fe1be58314b23e9f1adfe380f2b910622cc2468e
+ languageName: node
+ linkType: hard
+
"simple-update-notifier@npm:^2.0.0":
version: 2.0.0
resolution: "simple-update-notifier@npm:2.0.0"
@@ -32642,7 +32008,7 @@ __metadata:
languageName: node
linkType: hard
-"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0":
+"supports-color@npm:^7.1.0":
version: 7.1.0
resolution: "supports-color@npm:7.1.0"
dependencies:
@@ -32651,16 +32017,6 @@ __metadata:
languageName: node
linkType: hard
-"supports-hyperlinks@npm:^2.0.0":
- version: 2.2.0
- resolution: "supports-hyperlinks@npm:2.2.0"
- dependencies:
- has-flag: "npm:^4.0.0"
- supports-color: "npm:^7.0.0"
- checksum: a63f2acba5ba8088b155fb28fb6fed7de10c7dfe0593fe49c94b1f720031271df9dd917ddecb0cc68f69be678488c0f40697f2f1ae9ee969250af887115b15d0
- languageName: node
- linkType: hard
-
"supports-preserve-symlinks-flag@npm:^1.0.0":
version: 1.0.0
resolution: "supports-preserve-symlinks-flag@npm:1.0.0"
@@ -32877,16 +32233,6 @@ __metadata:
languageName: node
linkType: hard
-"terminal-link@npm:^2.0.0":
- version: 2.1.1
- resolution: "terminal-link@npm:2.1.1"
- dependencies:
- ansi-escapes: "npm:^4.2.1"
- supports-hyperlinks: "npm:^2.0.0"
- checksum: ce3d2cd3a438c4a9453947aa664581519173ea40e77e2534d08c088ee6dda449eabdbe0a76d2a516b8b73c33262fedd10d5270ccf7576ae316e3db170ce6562f
- languageName: node
- linkType: hard
-
"terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.7":
version: 5.3.8
resolution: "terser-webpack-plugin@npm:5.3.8"
@@ -33688,22 +33034,21 @@ __metadata:
languageName: node
linkType: hard
-"uint8arrays@npm:1.1.0":
- version: 1.1.0
- resolution: "uint8arrays@npm:1.1.0"
+"uint8arrays@npm:^2.1.3":
+ version: 2.1.10
+ resolution: "uint8arrays@npm:2.1.10"
dependencies:
- multibase: "npm:^3.0.0"
- web-encoding: "npm:^1.0.2"
- checksum: 839e17a24ae3e0f8dd12e6edc04bc52763ad402bf1db46ea3057d032efdac017ea810e1d7ea28068c58533f57fb6985833c323bac287498cace7608a115abb6e
+ multiformats: "npm:^9.4.2"
+ checksum: 63ceb5fecc09de69641531c847e0b435d15a73587e40d4db23ed9b8a1ebbe839ae39fe81a15ea6079cdf642fcf2583983f9a5d32726edc4bc5e87634f34e3bd5
languageName: node
linkType: hard
-"uint8arrays@npm:^2.1.3, uint8arrays@npm:^2.1.5":
- version: 2.1.5
- resolution: "uint8arrays@npm:2.1.5"
+"uint8arrays@npm:^3.0.0":
+ version: 3.1.1
+ resolution: "uint8arrays@npm:3.1.1"
dependencies:
- multibase: "npm:^4.0.1"
- checksum: 521a120ad21250004a95330d0501c87344c5072376b5d5d9ef642721f7913cc1880b823715e5d8829307a9dda73c3064283cb3a7442f0e85fef781cfca4f0334
+ multiformats: "npm:^9.4.2"
+ checksum: 536e70273c040484aa7d522031a9dbca1fe8c06eb58a3ace1064ba68825b4e2764d4a0b604a1c451e7b8be0986dc94f23a419cfe9334bd116716074a2d29b33d
languageName: node
linkType: hard
@@ -34877,7 +34222,7 @@ __metadata:
languageName: node
linkType: hard
-"web-encoding@npm:^1.0.2, web-encoding@npm:^1.0.6":
+"web-encoding@npm:^1.0.2":
version: 1.1.5
resolution: "web-encoding@npm:1.1.5"
dependencies:
@@ -35326,7 +34671,7 @@ __metadata:
languageName: node
linkType: hard
-"write-file-atomic@npm:^4.0.1, write-file-atomic@npm:^4.0.2":
+"write-file-atomic@npm:^4.0.2":
version: 4.0.2
resolution: "write-file-atomic@npm:4.0.2"
dependencies: