+ * Proposed names are populated in the state using the `NameController` and the attached `NameProvider` instances.
+ * These name providers use multiple sources such as ENS, Etherscan, and the Blockchain itself.
+ * Clicking the component will display a modal to select a proposed name or enter a custom name.
+ */
+export default {
+ title: 'Components/App/Name',
+ component: Name,
+ argTypes: {
+ value: {
+ control: 'text',
+ description: 'The raw value to display the name of.',
+ },
+ type: {
+ options: [NameType.ETHEREUM_ADDRESS],
+ control: 'select',
+ description: `The type of value.
+ Limited to the values in the \`NameType\` enum.`,
+ },
+ sourcePriority: {
+ control: 'object',
+ description: `The order of priority to use when choosing which proposed name to display.
+ The available source IDs are defined by the \`NameProvider\` instances passed to the \`NameController\`.
+ Current options include:
+ \`ens\`
+ \`etherscan\`
+ \`lens\`
+ \`token\``,
+ },
+ disableEdit: {
+ control: 'boolean',
+ description: `Whether to prevent the modal from opening when the component is clicked.`,
+ table: {
+ defaultValue: { summary: false },
+ },
+ },
+ disableUpdate: {
+ control: 'boolean',
+ description: `Whether to disable updating the proposed names on render.`,
+ table: {
+ defaultValue: { summary: false },
+ },
+ },
+ updateDelay: {
+ control: 'number',
+ description: `The minimum number of seconds to wait between updates of the proposed names on render.`,
+ table: {
+ defaultValue: { summary: 300 },
+ },
+ },
+ },
+ args: {
+ value: addressProposedMock,
+ type: NameType.ETHEREUM_ADDRESS,
+ sourcePriority: ['ens'],
+ disableEdit: false,
+ disableUpdate: false,
+ updateDelay: 300,
+ },
+ decorators: [(story) => {story()}],
+};
+
+// eslint-disable-next-line jsdoc/require-param
+/**
+ * A proposed name matching the value and type has been found in the state.
+ * Which proposed name is displayed is configurable by the `sourcePriority` property.
+ */
+export const DefaultStory = (args) => {
+ return ;
+};
+
+DefaultStory.storyName = 'Proposed Name';
+
+/** No proposed name matching the value and type has been found in the state. */
+export const NoProposedNameStory = () => {
+ return (
+
+ );
+};
+
+NoProposedNameStory.storyName = 'No Proposed Name';
+
+/**
+ * A name was previously saved for this value and type.
+
+`;
diff --git a/ui/components/ui/form-combo-field/form-combo-field.stories.tsx b/ui/components/ui/form-combo-field/form-combo-field.stories.tsx
new file mode 100644
index 000000000000..bd16b4fc29c9
--- /dev/null
+++ b/ui/components/ui/form-combo-field/form-combo-field.stories.tsx
@@ -0,0 +1,105 @@
+import React, { useCallback, useState } from 'react';
+import FormComboField from './form-combo-field';
+
+/**
+ * A form field that supports free text entry or the selection of a value from an attached dropdown list.
+ */
+// eslint-disable-next-line import/no-anonymous-default-export
+export default {
+ title: 'Components/UI/FormComboField',
+ component: FormComboField,
+ argTypes: {
+ value: {
+ control: 'text',
+ description: 'The value to display in the field.',
+ },
+ options: {
+ control: 'object',
+ description: `The options to display in the dropdown.
+ Must be an array of objects with a \`primaryLabel\` and optionally a \`secondaryLabel\` property.`,
+ },
+ placeholder: {
+ control: 'text',
+ description:
+ 'The placeholder text to display in the field when the value is empty.',
+ },
+ noOptionsText: {
+ control: 'text',
+ description: `The text to display in the dropdown when there are no options to display.`,
+ table: {
+ defaultValue: { summary: 'No options found' },
+ },
+ },
+ maxDropdownHeight: {
+ control: 'number',
+ description: 'The maximum height of the dropdown in pixels.',
+ table: {
+ defaultValue: { summary: 179 },
+ },
+ },
+ onChange: {
+ description: `Optional callback function to invoke when the value changes.`,
+ },
+ onOptionClick: {
+ description: `Optional callback function to invoke when a dropdown option is clicked.`,
+ },
+ },
+ args: {
+ value: undefined,
+ options: [
+ { primaryLabel: 'Berlin', secondaryLabel: 'Germany' },
+ { primaryLabel: 'London', secondaryLabel: 'United Kingdom' },
+ { primaryLabel: 'Lisbon', secondaryLabel: 'Portugal' },
+ { primaryLabel: 'Paris', secondaryLabel: 'France' },
+ ],
+ placeholder: 'Specify a city...',
+ noOptionsText: undefined,
+ maxDropdownHeight: undefined,
+ onChange: undefined,
+ onOptionClick: undefined,
+ },
+};
+
+export const DefaultStory = (args) => {
+ const [value, setValue] = useState('');
+
+ const handleChange = useCallback(
+ (newValue: string) => {
+ setValue(newValue);
+ },
+ [setValue],
+ );
+
+ return (
+
>
diff --git a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.test.js b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.test.js
index d3b83b887a48..d0407677af71 100644
--- a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.test.js
+++ b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.test.js
@@ -23,6 +23,13 @@ describe('Privacy Settings Onboarding View', () => {
[CHAIN_IDS.SEPOLIA]: false,
[CHAIN_IDS.LINEA_GOERLI]: true,
},
+ usePhishDetect: true,
+ use4ByteResolution: true,
+ useTokenDetection: false,
+ useCurrencyRateCheck: true,
+ useMultiAccountBalanceChecker: true,
+ ipfsGateway: 'test.link',
+ useAddressBarEnsResolution: true,
},
};
@@ -58,7 +65,7 @@ describe('Privacy Settings Onboarding View', () => {
,
store,
);
- // All settings are initialized toggled to true
+ // All settings are initialized toggled to be same as default
expect(setUsePhishDetectStub).toHaveBeenCalledTimes(0);
expect(setUse4ByteResolutionStub).toHaveBeenCalledTimes(0);
expect(setUseTokenDetectionStub).toHaveBeenCalledTimes(0);
@@ -96,7 +103,7 @@ describe('Privacy Settings Onboarding View', () => {
expect(setUsePhishDetectStub.mock.calls[0][0]).toStrictEqual(false);
expect(setUse4ByteResolutionStub.mock.calls[0][0]).toStrictEqual(false);
- expect(setUseTokenDetectionStub.mock.calls[0][0]).toStrictEqual(false);
+ expect(setUseTokenDetectionStub.mock.calls[0][0]).toStrictEqual(true);
expect(setUseMultiAccountBalanceCheckerStub.mock.calls[0][0]).toStrictEqual(
false,
);
From a3a99aaaebc1a5b7edae6678a8452dd72b887441 Mon Sep 17 00:00:00 2001
From: Howard Braham
Date: Tue, 19 Sep 2023 09:57:42 -0700
Subject: [PATCH 017/137] fix: catch the rejection if you submit an incorrect
password to "Show private key" (#20920)
Catch the rejection if you submit an incorrect password to "Show private key" and also fixes warnings that happen if you enter the wrong password.
Co-authored-by: montelaidev
---
.../account-details-authenticate.js | 19 +++++++++++--------
.../__snapshots__/reveal-seed.test.js.snap | 1 +
ui/pages/keychains/reveal-seed.js | 2 +-
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/ui/components/multichain/account-details/account-details-authenticate.js b/ui/components/multichain/account-details/account-details-authenticate.js
index 6ebec5609c82..2701293c3ffa 100644
--- a/ui/components/multichain/account-details/account-details-authenticate.js
+++ b/ui/components/multichain/account-details/account-details-authenticate.js
@@ -7,6 +7,8 @@ import {
Severity,
TextVariant,
} from '../../../helpers/constants/design-system';
+import { useI18nContext } from '../../../hooks/useI18nContext';
+import { exportAccount, hideWarning } from '../../../store/actions';
import {
BannerAlert,
Box,
@@ -15,9 +17,6 @@ import {
FormTextField,
} from '../../component-library';
-import { useI18nContext } from '../../../hooks/useI18nContext';
-import { exportAccount, hideWarning } from '../../../store/actions';
-
export const AccountDetailsAuthenticate = ({
address,
onCancel,
@@ -35,10 +34,14 @@ export const AccountDetailsAuthenticate = ({
const onSubmit = useCallback(() => {
dispatch(
exportAccount(password, address, setPrivateKey, setShowHoldToReveal),
- ).then((res) => {
- dispatch(hideWarning());
- return res;
- });
+ )
+ .then((res) => {
+ dispatch(hideWarning());
+ return res;
+ })
+ .catch(() => {
+ // No need to do anything more with the caught error here, we already logged the error
+ });
}, [dispatch, password, address, setPrivateKey, setShowHoldToReveal]);
const handleKeyPress = useCallback(
@@ -57,7 +60,7 @@ export const AccountDetailsAuthenticate = ({
id="account-details-authenticate"
label={t('enterYourPassword')}
placeholder={t('password')}
- error={warning}
+ error={Boolean(warning)}
helpText={warning}
onChange={(e) => setPassword(e.target.value)}
value={password}
diff --git a/ui/pages/keychains/__snapshots__/reveal-seed.test.js.snap b/ui/pages/keychains/__snapshots__/reveal-seed.test.js.snap
index fc869ffcef79..92fce9dedec0 100644
--- a/ui/pages/keychains/__snapshots__/reveal-seed.test.js.snap
+++ b/ui/pages/keychains/__snapshots__/reveal-seed.test.js.snap
@@ -89,6 +89,7 @@ exports[`Reveal Seed Page should match snapshot 1`] = `
class="box mm-text-field mm-text-field--size-lg mm-text-field--focused mm-text-field--truncate box--display-inline-flex box--flex-direction-row box--align-items-center box--width-full box--background-color-background-default box--rounded-sm box--border-width-1 box--border-style-solid"
>
setPassword(event.target.value)}
- error={error}
+ error={Boolean(error)}
width={BlockSize.Full}
/>
{error && (
From fbddf59b0ec79cbf96722caaa2a6730397ff026b Mon Sep 17 00:00:00 2001
From: Pedro Figueiredo
Date: Wed, 20 Sep 2023 12:17:12 +0100
Subject: [PATCH 018/137] fix: Copy and add 3rd party API links (#20929)
* Fix copy and add 3rd party API links
* Extract uppercase logic into a variable
* Fix snapshot tests
* fix e2e test
* fix lint error
---
app/_locales/de/messages.json | 3 -
app/_locales/el/messages.json | 3 -
app/_locales/en/messages.json | 4 +-
app/_locales/es/messages.json | 3 -
app/_locales/fr/messages.json | 3 -
app/_locales/hi/messages.json | 3 -
app/_locales/id/messages.json | 3 -
app/_locales/ja/messages.json | 3 -
app/_locales/ko/messages.json | 3 -
app/_locales/pt/messages.json | 3 -
app/_locales/ru/messages.json | 3 -
app/_locales/tl/messages.json | 3 -
app/_locales/tr/messages.json | 3 -
app/_locales/vi/messages.json | 3 -
app/_locales/zh_CN/messages.json | 3 -
shared/constants/network.ts | 9 ++
.../incoming-transaction-toggle.test.js.snap | 140 ++++++++++++++----
.../incoming-transaction-toggle.tsx | 2 +-
.../network-toggle.tsx | 97 ++++++++----
.../__snapshots__/security-tab.test.js.snap | 117 ++++++++++++---
20 files changed, 295 insertions(+), 116 deletions(-)
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index 730cd338ff57..e11ed08c5669 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -3877,9 +3877,6 @@
"message": "Das hängt von $1 ab, das Zugriff auf Ihre Ethereum-Adresse und Ihre IP-Adresse hat. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Dies hängt von jedem Netzwerk ab, das Zugriff auf Ihre Ethereum-Adresse und IP-Adresse hat."
- },
"showMore": {
"message": "Mehr anzeigen"
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index 132e7a9ddc72..c6ba71ba5f04 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -3877,9 +3877,6 @@
"message": "Αυτό βασίζεται στο $1, το οποίο θα έχει πρόσβαση στη διεύθυνση Ethereum και τη διεύθυνση IP σας. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Αυτό βασίζεται σε κάθε δίκτυο που θα έχει πρόσβαση στη διεύθυνση Ethereum και στη διεύθυνση IP σας."
- },
"showMore": {
"message": "Εμφάνιση περισσότερων"
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index ec21cac8b04f..a7cc7089f863 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -3945,8 +3945,8 @@
"message": "This relies on $1 which will have access to your Ethereum address and your IP address. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "This relies on each network which will have access to your Ethereum address and your IP address."
+ "showIncomingTransactionsExplainer": {
+ "message": "This relies on different third-party APIs for each network, which expose your Ethereum address and your IP address."
},
"showMore": {
"message": "Show more"
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index a8c3be966f45..1289b6ec18f6 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -3877,9 +3877,6 @@
"message": "Seleccione esta opción para usar Etherscan para mostrar las transacciones entrantes en la lista de transacciones",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Esto depende de cada red que tendrá acceso a su dirección Ethereum y su dirección IP."
- },
"showMore": {
"message": "Mostrar más"
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index 5d92ea6756ee..b5e898b17e64 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -3877,9 +3877,6 @@
"message": "Sélectionnez ceci pour utiliser Etherscan afin d’afficher les transactions entrantes dans la liste des transactions",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Cela dépend de chaque réseau qui aura accès à votre adresse Ethereum et à votre adresse IP."
- },
"showMore": {
"message": "Afficher plus"
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index eaebc034dfc0..8305de259fb3 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -3877,9 +3877,6 @@
"message": "लेनदेन सूची में आने वाले लेनदेन को दिखाने के लिए Etherscan का उपयोग करने के लिए इसका चयन करें",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "यह हर उस नेटवर्क पर निर्भर करता है जिसे आपके Ethereum एड्रेस और आपके IP एड्रेस का एक्सेस होगा।"
- },
"showMore": {
"message": "अधिक दिखाएं"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index e0d4921b4dac..092c28c62c9e 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -3877,9 +3877,6 @@
"message": "Pilih ini untuk menggunakan Etherscan untuk menampilkan transaksi yang masuk di daftar transaksi",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Ini bergantung pada setiap jaringan yang akan memiliki akses ke alamat Ethereum dan alamat IP Anda."
- },
"showMore": {
"message": "Tampilkan selengkapnya"
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 0ce08bf3df7c..7e78096819ad 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -3877,9 +3877,6 @@
"message": "これは、ユーザーのイーサリアムアドレスおよびIPアドレスにアクセスする$1に依存します。$2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "これは、ユーザーのイーサリアムアドレスおよびIPアドレスにアクセスする各ネットワークに依存します。"
- },
"showMore": {
"message": "他を表示"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index 294bcb5c82de..852c9eff84ff 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -3877,9 +3877,6 @@
"message": "이 항목을 선택하면 Etherscan을 사용해 거래 목록에 수신 거래를 표시할 수 있습니다.",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "이 기능을 이용하려면 이더리움 주소와 IP 주소에 접근 가능한 네트워크가 필요합니다."
- },
"showMore": {
"message": "더 보기"
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index 03b770aeabd8..fd60c9ecbf9f 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -3877,9 +3877,6 @@
"message": "Isso depende de $1, que terá acesso ao seu endereço Ethereum e ao seu endereço IP. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Isso depende de cada rede que terá acesso ao seu endereço Ethereum e ao seu endereço IP."
- },
"showMore": {
"message": "Exibir mais"
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index 493b1f33bf1f..7618ac9e2ed0 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -3877,9 +3877,6 @@
"message": "Это использует $1, который будет иметь доступ к вашему адресу Ethereum и вашему IP-адресу. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Это зависит от каждой сети, которая будет иметь доступ к вашему адресу Ethereum и вашему IP-адресу."
- },
"showMore": {
"message": "Показать больше"
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index 167d0fd77526..b69e584676af 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -3877,9 +3877,6 @@
"message": "Umaasa ito sa $1 na magkakaroon ng access sa iyong Ethereum address at sa iyong IP address. $2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Umaasa ito sa bawat network na magkakaroon ng access sa iyong Ethereum address at sa iyong IP address."
- },
"showMore": {
"message": "Ipakita ang iba pa"
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index 09e233a827f6..adbc419d8435 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -3877,9 +3877,6 @@
"message": "Etherscan'in işlemler listesinde gelecek işlemleri göstermesi için bunu seçin",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Bu, Ethereum adresinize ve IP adresinize erişimi olacak olan her bir ağa dayalıdır."
- },
"showMore": {
"message": "Daha fazlasını göster"
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index f78d61cc37fe..64af5ae9448f 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -3877,9 +3877,6 @@
"message": "Chọn tùy chọn này nếu bạn muốn dùng Etherscan để hiển thị các giao dịch đến trong danh sách giao dịch",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "Điều này phụ thuộc vào từng mạng sẽ có quyền truy cập vào địa chỉ Ethereum và địa chỉ IP của bạn."
- },
"showMore": {
"message": "Hiển thị thêm"
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index 62fdb4d56b6a..a0a2c30ef84a 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -3877,9 +3877,6 @@
"message": "这取决于$1,即可以访问您的以太坊地址和 IP 地址的网络。$2",
"description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs"
},
- "showIncomingTransactionsInformation": {
- "message": "这取决于每个可以访问您的以太坊地址和 IP 地址的网络。"
- },
"showMore": {
"message": "展开"
},
diff --git a/shared/constants/network.ts b/shared/constants/network.ts
index e4eb45d8b17c..db5ca5477740 100644
--- a/shared/constants/network.ts
+++ b/shared/constants/network.ts
@@ -336,6 +336,14 @@ export const BUILT_IN_INFURA_NETWORKS = pick(
export type BuiltInInfuraNetwork = keyof typeof BUILT_IN_INFURA_NETWORKS;
+// type SupportedNetworksType = {
+// [key: string]: {
+// domain: string;
+// subdomain: string;
+// networkId: string;
+// };
+// };
+
export const NETWORK_TO_NAME_MAP = {
[NETWORK_TYPES.MAINNET]: MAINNET_DISPLAY_NAME,
[NETWORK_TYPES.GOERLI]: GOERLI_DISPLAY_NAME,
@@ -427,6 +435,7 @@ export const INFURA_BLOCKED_KEY = 'countryBlocked';
const defaultEtherscanDomain = 'etherscan.io';
const defaultEtherscanSubdomainPrefix = 'api';
+
/**
* Map of all Etherscan supported networks.
*/
diff --git a/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
index a1ed4f6002e0..fafe28db8982 100644
--- a/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
+++ b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
@@ -13,7 +13,7 @@ exports[`IncomingTransactionToggle should render existing incoming transaction p
- This relies on each network which will have access to your Ethereum address and your IP address.
+ This relies on different third-party APIs for each network, which expose your Ethereum address and your IP address.
+ Turning on this feature will give you the option to add a Snap account right from your account list. If you install a Snap account, remember that it is a third-party service.
+
@@ -247,6 +330,11 @@ export default class ExperimentalTab extends PureComponent {
///: END:ONLY_INCLUDE_IN
}
{this.renderTransactionSecurityCheckToggle()}
+ {
+ ///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+ this.renderKeyringSnapsToggle()
+ ///: END:ONLY_INCLUDE_IN
+ }
{
///: BEGIN:ONLY_INCLUDE_IN(desktop)
this.renderDesktopEnableButton()
diff --git a/ui/pages/settings/experimental-tab/experimental-tab.container.js b/ui/pages/settings/experimental-tab/experimental-tab.container.js
index dadf718ec2e4..567a88759cd9 100644
--- a/ui/pages/settings/experimental-tab/experimental-tab.container.js
+++ b/ui/pages/settings/experimental-tab/experimental-tab.container.js
@@ -6,12 +6,18 @@ import {
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
setSecurityAlertsEnabled,
///: END:ONLY_INCLUDE_IN
+ ///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+ setAddSnapAccountEnabled,
+ ///: END:ONLY_INCLUDE_IN
} from '../../../store/actions';
import {
getIsTransactionSecurityCheckEnabled,
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
getIsSecurityAlertsEnabled,
///: END:ONLY_INCLUDE_IN
+ ///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+ getIsAddSnapAccountEnabled,
+ ///: END:ONLY_INCLUDE_IN
} from '../../../selectors';
import ExperimentalTab from './experimental-tab.component';
@@ -19,9 +25,14 @@ const mapStateToProps = (state) => {
return {
transactionSecurityCheckEnabled:
getIsTransactionSecurityCheckEnabled(state),
+
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
securityAlertsEnabled: getIsSecurityAlertsEnabled(state),
///: END:ONLY_INCLUDE_IN
+
+ ///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+ addSnapAccountEnabled: getIsAddSnapAccountEnabled(state),
+ ///: END:ONLY_INCLUDE_IN
};
};
@@ -29,9 +40,14 @@ const mapDispatchToProps = (dispatch) => {
return {
setTransactionSecurityCheckEnabled: (val) =>
dispatch(setTransactionSecurityCheckEnabled(val)),
+
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
setSecurityAlertsEnabled: (val) => setSecurityAlertsEnabled(val),
///: END:ONLY_INCLUDE_IN
+
+ ///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+ setAddSnapAccountEnabled: (val) => setAddSnapAccountEnabled(val),
+ ///: END:ONLY_INCLUDE_IN
};
};
diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js
index 5f554f54fbbd..69e6c4cb1e4c 100644
--- a/ui/selectors/selectors.js
+++ b/ui/selectors/selectors.js
@@ -1533,6 +1533,18 @@ export function getIsSecurityAlertsEnabled(state) {
}
///: END:ONLY_INCLUDE_IN
+///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+/**
+ * Get the state of the `addSnapAccountEnabled` flag.
+ *
+ * @param {*} state
+ * @returns The state of the `addSnapAccountEnabled` flag.
+ */
+export function getIsAddSnapAccountEnabled(state) {
+ return state.metamask.addSnapAccountEnabled;
+}
+///: END:ONLY_INCLUDE_IN
+
export function getIsCustomNetwork(state) {
const chainId = getCurrentChainId(state);
diff --git a/ui/store/actions.ts b/ui/store/actions.ts
index 23016882516c..4dfefa608109 100644
--- a/ui/store/actions.ts
+++ b/ui/store/actions.ts
@@ -4436,6 +4436,16 @@ export function setSecurityAlertsEnabled(val: boolean): void {
}
///: END:ONLY_INCLUDE_IN
+///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
+export async function setAddSnapAccountEnabled(value: boolean): Promise {
+ try {
+ await submitRequestToBackground('setAddSnapAccountEnabled', [value]);
+ } catch (error) {
+ logErrorWithMessage(error);
+ }
+}
+///: END:ONLY_INCLUDE_IN
+
export function setFirstTimeUsedNetwork(chainId: string) {
return submitRequestToBackground('setFirstTimeUsedNetwork', [chainId]);
}
From 1e034e06c04ae7745472a0b478b6918a0c483c21 Mon Sep 17 00:00:00 2001
From: Daniel Rocha
Date: Fri, 22 Sep 2023 09:45:42 +0200
Subject: [PATCH 037/137] Update `eth-snap-keyring` to 0.2.x to use the
`keyring-api` 0.2.x (#20865)
* Update 'eth-snap-keyring' to 0.2.x to use the 'keyring-api' 0.2.x
Note: This PR only affects Flask.
BREAKING CHANGE: The 'keyring-api' 0.2.x is incompatible with the
previous 0.1.x release.
* Update LavaMoat policies
* chore: change SSK url to v0.2.0
* fix: pass `removeAccount` callback to `SnapKeyring`
* chore: update `simple-snap-keyring` URL
* fix: text typo in snap E2E
* fix: remove name input from E2E
* fix: update button name
* chore(deps): bump fast-xml-parser to 4.2.5
* test: update SSK version
* chore: update `yarn.lock` after merge
* Update LavaMoat policies
---------
Co-authored-by: MetaMask Bot
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: gantunesr
---
app/scripts/metamask-controller.js | 3 +
lavamoat/browserify/beta/policy.json | 165 ++++-------
lavamoat/browserify/desktop/policy.json | 170 ++++++-----
lavamoat/browserify/flask/policy.json | 170 ++++++-----
lavamoat/browserify/main/policy.json | 165 ++++-------
lavamoat/browserify/mmi/policy.json | 165 ++++-------
package.json | 2 +-
test/e2e/snaps/enums.js | 2 +-
.../e2e/snaps/test-snap-manageAccount.spec.js | 7 +-
yarn.lock | 263 +++++++++++-------
10 files changed, 511 insertions(+), 601 deletions(-)
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 33d16f66b0f7..e4c0d18f0e41 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -868,6 +868,9 @@ export default class MetamaskController extends EventEmitter {
saveState: async () => {
await this.keyringController.persistAllKeyrings();
},
+ removeAccount: async (address) => {
+ await this.removeAccount(address);
+ },
});
builder.type = SnapKeyring.type;
return builder;
diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json
index a6eca099ed40..0470833108c3 100644
--- a/lavamoat/browserify/beta/policy.json
+++ b/lavamoat/browserify/beta/policy.json
@@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
- }
- },
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
+ "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
@@ -934,7 +919,7 @@
"@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -942,21 +927,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-json-rpc-middleware>clone": {
"packages": {
"browserify>buffer": true
@@ -979,7 +949,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
@@ -1051,7 +1021,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"mocha>serialize-javascript>randombytes": true,
"webpack>events": true
@@ -1107,17 +1077,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
@@ -1137,32 +1115,6 @@
"koa>content-disposition>safe-buffer": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
- "bn.js": true,
- "browserify>buffer": true,
- "eth-sig-util>ethereumjs-util>ethjs-util": true,
- "eth-sig-util>tweetnacl": true,
- "eth-sig-util>tweetnacl-util": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-token-tracker": {
"globals": {
"console.warn": true
@@ -1292,6 +1244,17 @@
"webpack>events": true
}
},
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "bn.js": true,
+ "browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "eth-sig-util>tweetnacl": true,
+ "eth-sig-util>tweetnacl-util": true
+ }
+ },
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1306,7 +1269,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
@@ -1567,7 +1530,7 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1575,21 +1538,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1605,26 +1553,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
+ "packages": {
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>crypto-browserify>create-hmac": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
+ "ethereumjs-util>ethereum-cryptography>hash.js": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "koa>content-disposition>safe-buffer": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
@@ -1663,7 +1624,7 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1671,21 +1632,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
@@ -3602,13 +3548,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
@@ -3649,11 +3603,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"ethereumjs-util": {
"packages": {
"bn.js": true,
@@ -3716,14 +3678,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
- "browserify>assert": true,
"browserify>buffer": true,
- "browserify>crypto-browserify>create-hmac": true,
- "ethereumjs-util>ethereum-cryptography>bs58check": true,
- "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
- "koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json
index bede398269d4..4c633de6fec1 100644
--- a/lavamoat/browserify/desktop/policy.json
+++ b/lavamoat/browserify/desktop/policy.json
@@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
- }
- },
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
+ "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
@@ -1005,7 +990,7 @@
"@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1013,21 +998,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-json-rpc-middleware>clone": {
"packages": {
"browserify>buffer": true
@@ -1050,7 +1020,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
@@ -1122,7 +1092,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"mocha>serialize-javascript>randombytes": true,
"webpack>events": true
@@ -1178,17 +1148,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
@@ -1210,11 +1188,11 @@
},
"@metamask/eth-snap-keyring": {
"globals": {
- "console.error": true,
- "console.warn": true
+ "console.error": true
},
"packages": {
"@ethereumjs/tx": true,
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/eth-snap-keyring>@metamask/keyring-api": true,
"@metamask/eth-snap-keyring>@metamask/utils": true,
"@metamask/eth-snap-keyring>uuid": true,
@@ -1225,27 +1203,32 @@
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
- "bn.js": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true,
+ "@metamask/eth-snap-keyring>@metamask/utils": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils>@metamask/utils": true,
+ "superstruct": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils>@metamask/utils": {
"globals": {
- "TextEncoder": true,
- "crypto": true
+ "TextDecoder": true,
+ "TextEncoder": true
+ },
+ "packages": {
+ "@metamask/key-tree>@noble/hashes": true,
+ "browserify>buffer": true,
+ "nock>debug": true,
+ "semver": true,
+ "superstruct": true
}
},
"@metamask/eth-snap-keyring>@metamask/keyring-api": {
@@ -1420,6 +1403,17 @@
"webpack>events": true
}
},
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "bn.js": true,
+ "browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "eth-sig-util>tweetnacl": true,
+ "eth-sig-util>tweetnacl-util": true
+ }
+ },
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1434,7 +1428,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
@@ -1718,7 +1712,7 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1726,21 +1720,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1756,26 +1735,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
+ "packages": {
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>crypto-browserify>create-hmac": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
+ "ethereumjs-util>ethereum-cryptography>hash.js": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "koa>content-disposition>safe-buffer": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
@@ -1814,7 +1806,7 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1822,21 +1814,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
@@ -4094,13 +4071,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
@@ -4141,11 +4126,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"ethereumjs-util": {
"packages": {
"bn.js": true,
@@ -4208,14 +4201,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
- "browserify>assert": true,
"browserify>buffer": true,
- "browserify>crypto-browserify>create-hmac": true,
- "ethereumjs-util>ethereum-cryptography>bs58check": true,
- "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
- "koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json
index 873139ec3333..aa332f56b1bb 100644
--- a/lavamoat/browserify/flask/policy.json
+++ b/lavamoat/browserify/flask/policy.json
@@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
- }
- },
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
+ "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
@@ -1005,7 +990,7 @@
"@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1013,21 +998,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-json-rpc-middleware>clone": {
"packages": {
"browserify>buffer": true
@@ -1050,7 +1020,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
@@ -1122,7 +1092,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"mocha>serialize-javascript>randombytes": true,
"webpack>events": true
@@ -1178,17 +1148,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
@@ -1210,11 +1188,11 @@
},
"@metamask/eth-snap-keyring": {
"globals": {
- "console.error": true,
- "console.warn": true
+ "console.error": true
},
"packages": {
"@ethereumjs/tx": true,
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/eth-snap-keyring>@metamask/keyring-api": true,
"@metamask/eth-snap-keyring>@metamask/utils": true,
"@metamask/eth-snap-keyring>uuid": true,
@@ -1225,27 +1203,32 @@
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
- "bn.js": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true,
+ "@metamask/eth-snap-keyring>@metamask/utils": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils>@metamask/utils": true,
+ "superstruct": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
+ "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils>@metamask/utils": {
"globals": {
- "TextEncoder": true,
- "crypto": true
+ "TextDecoder": true,
+ "TextEncoder": true
+ },
+ "packages": {
+ "@metamask/key-tree>@noble/hashes": true,
+ "browserify>buffer": true,
+ "nock>debug": true,
+ "semver": true,
+ "superstruct": true
}
},
"@metamask/eth-snap-keyring>@metamask/keyring-api": {
@@ -1420,6 +1403,17 @@
"webpack>events": true
}
},
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "bn.js": true,
+ "browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "eth-sig-util>tweetnacl": true,
+ "eth-sig-util>tweetnacl-util": true
+ }
+ },
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1434,7 +1428,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
@@ -1718,7 +1712,7 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1726,21 +1720,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1756,26 +1735,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
+ "packages": {
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>crypto-browserify>create-hmac": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
+ "ethereumjs-util>ethereum-cryptography>hash.js": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "koa>content-disposition>safe-buffer": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
@@ -1814,7 +1806,7 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1822,21 +1814,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
@@ -4110,13 +4087,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
@@ -4157,11 +4142,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"ethereumjs-util": {
"packages": {
"bn.js": true,
@@ -4224,14 +4217,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
- "browserify>assert": true,
"browserify>buffer": true,
- "browserify>crypto-browserify>create-hmac": true,
- "ethereumjs-util>ethereum-cryptography>bs58check": true,
- "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
- "koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json
index b338c1e8f697..c8b44246f8b9 100644
--- a/lavamoat/browserify/main/policy.json
+++ b/lavamoat/browserify/main/policy.json
@@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
- }
- },
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
+ "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
@@ -934,7 +919,7 @@
"@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -942,21 +927,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-json-rpc-middleware>clone": {
"packages": {
"browserify>buffer": true
@@ -979,7 +949,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
@@ -1051,7 +1021,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"mocha>serialize-javascript>randombytes": true,
"webpack>events": true
@@ -1107,17 +1077,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
@@ -1137,32 +1115,6 @@
"koa>content-disposition>safe-buffer": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
- "bn.js": true,
- "browserify>buffer": true,
- "eth-sig-util>ethereumjs-util>ethjs-util": true,
- "eth-sig-util>tweetnacl": true,
- "eth-sig-util>tweetnacl-util": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-token-tracker": {
"globals": {
"console.warn": true
@@ -1292,6 +1244,17 @@
"webpack>events": true
}
},
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "bn.js": true,
+ "browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "eth-sig-util>tweetnacl": true,
+ "eth-sig-util>tweetnacl-util": true
+ }
+ },
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1306,7 +1269,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
@@ -1567,7 +1530,7 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1575,21 +1538,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1605,26 +1553,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
+ "packages": {
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>crypto-browserify>create-hmac": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
+ "ethereumjs-util>ethereum-cryptography>hash.js": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "koa>content-disposition>safe-buffer": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
@@ -1663,7 +1624,7 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1671,21 +1632,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
@@ -3881,13 +3827,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
@@ -3928,11 +3882,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"ethereumjs-util": {
"packages": {
"bn.js": true,
@@ -3995,14 +3957,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
- "browserify>assert": true,
"browserify>buffer": true,
- "browserify>crypto-browserify>create-hmac": true,
- "ethereumjs-util>ethereum-cryptography>bs58check": true,
- "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
- "koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json
index 99beea63a6c4..2f2ebb2330f9 100644
--- a/lavamoat/browserify/mmi/policy.json
+++ b/lavamoat/browserify/mmi/policy.json
@@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
- }
- },
- "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
+ "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
@@ -1074,7 +1059,7 @@
"@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1082,21 +1067,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-json-rpc-middleware>clone": {
"packages": {
"browserify>buffer": true
@@ -1119,7 +1089,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
@@ -1191,7 +1161,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"mocha>serialize-javascript>randombytes": true,
"webpack>events": true
@@ -1247,17 +1217,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
@@ -1277,32 +1255,6 @@
"koa>content-disposition>safe-buffer": true
}
},
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
- "bn.js": true,
- "browserify>buffer": true,
- "eth-sig-util>ethereumjs-util>ethjs-util": true,
- "eth-sig-util>tweetnacl": true,
- "eth-sig-util>tweetnacl-util": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/eth-token-tracker": {
"globals": {
"console.warn": true
@@ -1432,6 +1384,17 @@
"webpack>events": true
}
},
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
+ "bn.js": true,
+ "browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "eth-sig-util>tweetnacl": true,
+ "eth-sig-util>tweetnacl-util": true
+ }
+ },
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1446,7 +1409,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
- "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
+ "@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
@@ -1707,7 +1670,7 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1715,21 +1678,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1745,26 +1693,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
+ "packages": {
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>crypto-browserify>create-hmac": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
+ "ethereumjs-util>ethereum-cryptography>hash.js": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "koa>content-disposition>safe-buffer": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
@@ -1803,7 +1764,7 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
+ "@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
@@ -1811,21 +1772,6 @@
"eth-sig-util>tweetnacl-util": true
}
},
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
- "globals": {
- "TextDecoder": true,
- "crypto": true
- },
- "packages": {
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
- }
- },
- "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
@@ -3742,13 +3688,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
+ "eth-sig-util>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
@@ -3789,11 +3743,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
- "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
+ "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
+ "packages": {
+ "browserify>buffer": true,
+ "ethereumjs-util>ethereum-cryptography>keccak": true,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": true,
+ "mocha>serialize-javascript>randombytes": true
+ }
+ },
"ethereumjs-util": {
"packages": {
"bn.js": true,
@@ -3856,14 +3818,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
- "browserify>assert": true,
"browserify>buffer": true,
- "browserify>crypto-browserify>create-hmac": true,
- "ethereumjs-util>ethereum-cryptography>bs58check": true,
- "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
- "koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
diff --git a/package.json b/package.json
index 0ff9576f0d03..fd03fad33b78 100644
--- a/package.json
+++ b/package.json
@@ -245,7 +245,7 @@
"@metamask/eth-json-rpc-middleware": "^11.0.0",
"@metamask/eth-keyring-controller": "^10.0.1",
"@metamask/eth-ledger-bridge-keyring": "^0.15.0",
- "@metamask/eth-snap-keyring": "^0.1.4",
+ "@metamask/eth-snap-keyring": "^0.2.2",
"@metamask/eth-token-tracker": "^4.0.0",
"@metamask/eth-trezor-keyring": "^1.1.0",
"@metamask/etherscan-link": "^2.2.0",
diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js
index 6ec77de3087e..d16ed59ae4a4 100644
--- a/test/e2e/snaps/enums.js
+++ b/test/e2e/snaps/enums.js
@@ -2,5 +2,5 @@ module.exports = {
TEST_SNAPS_WEBSITE_URL:
'https://metamask.github.io/snaps/test-snaps/0.38.0-flask.1/',
TEST_SNAPS_SIMPLE_KEYRING_WEBSITE_URL:
- 'https://metamask.github.io/snap-simple-keyring/0.1.4/',
+ 'https://metamask.github.io/snap-simple-keyring/0.2.2/',
};
diff --git a/test/e2e/snaps/test-snap-manageAccount.spec.js b/test/e2e/snaps/test-snap-manageAccount.spec.js
index 44ca13dbc3f6..1c634ec7331b 100644
--- a/test/e2e/snaps/test-snap-manageAccount.spec.js
+++ b/test/e2e/snaps/test-snap-manageAccount.spec.js
@@ -81,15 +81,12 @@ describe('Test Snap Account', function () {
// create new account on dapp
await driver.clickElement({
- text: 'Create Account',
+ text: 'Create account',
tag: 'div',
});
- // create name for account
- await driver.fill("[placeholder='Name']", 'snap account');
-
await driver.clickElement({
- text: 'Execute',
+ text: 'Create Account',
tag: 'button',
});
diff --git a/yarn.lock b/yarn.lock
index 46c4d3043733..9fb2e813cb4d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3762,6 +3762,16 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/abi-utils@npm:^2.0.2":
+ version: 2.0.2
+ resolution: "@metamask/abi-utils@npm:2.0.2"
+ dependencies:
+ "@metamask/utils": "npm:^8.0.0"
+ superstruct: "npm:^1.0.3"
+ checksum: 150218e81d4e494196ce967f203a4fa6c03c07dc4e319cf72429cb37586e851adf9b0b89e341faeab38c5f03f6f8dff175486653e9a6da6c7fa9e4c9f96430e9
+ languageName: node
+ linkType: hard
+
"@metamask/address-book-controller@npm:^3.0.0":
version: 3.0.0
resolution: "@metamask/address-book-controller@npm:3.0.0"
@@ -4111,7 +4121,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-sig-util@npm:^5.0.1, @metamask/eth-sig-util@npm:^5.0.2, @metamask/eth-sig-util@npm:^5.1.0":
+"@metamask/eth-sig-util@npm:^5.0.1, @metamask/eth-sig-util@npm:^5.0.2":
version: 5.1.0
resolution: "@metamask/eth-sig-util@npm:5.1.0"
dependencies:
@@ -4139,6 +4149,21 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/eth-sig-util@npm:^7.0.0":
+ version: 7.0.0
+ resolution: "@metamask/eth-sig-util@npm:7.0.0"
+ dependencies:
+ "@ethereumjs/util": "npm:^8.1.0"
+ "@metamask/abi-utils": "npm:^2.0.2"
+ "@metamask/utils": "npm:^8.1.0"
+ ethereum-cryptography: "npm:^2.1.2"
+ ethjs-util: "npm:^0.1.6"
+ tweetnacl: "npm:^1.0.3"
+ tweetnacl-util: "npm:^0.15.1"
+ checksum: c399e615749ac78224d5e68883eff9bfb856eb26225d218937ac5ccb84e529157c0b1244dce449eb3dcb408a7830f2b4c0c1b2a6b1653049d93b3d76aae17860
+ languageName: node
+ linkType: hard
+
"@metamask/eth-simple-keyring@npm:^5.0.0":
version: 5.0.0
resolution: "@metamask/eth-simple-keyring@npm:5.0.0"
@@ -4151,19 +4176,19 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-snap-keyring@npm:^0.1.4":
- version: 0.1.4
- resolution: "@metamask/eth-snap-keyring@npm:0.1.4"
+"@metamask/eth-snap-keyring@npm:^0.2.2":
+ version: 0.2.2
+ resolution: "@metamask/eth-snap-keyring@npm:0.2.2"
dependencies:
- "@ethereumjs/tx": "npm:^4.1.2"
- "@metamask/eth-sig-util": "npm:^5.1.0"
- "@metamask/keyring-api": "npm:^0.1.3"
- "@metamask/snaps-controllers": "npm:^0.35.2-flask.1"
- "@metamask/utils": "npm:^6.1.0"
+ "@ethereumjs/tx": "npm:^4.2.0"
+ "@metamask/eth-sig-util": "npm:^7.0.0"
+ "@metamask/keyring-api": "npm:^0.2.3"
+ "@metamask/snaps-controllers": "npm:^0.38.2-flask.1"
+ "@metamask/utils": "npm:^8.1.0"
"@types/uuid": "npm:^9.0.1"
superstruct: "npm:^1.0.3"
uuid: "npm:^9.0.0"
- checksum: fe626464be4cc86665fadece8e55d55494eecaa9b86193f2381f72f8366781ff5f4faca4fb5a94e0ab4d75f8b21bb7914b22854f733bb941f6ea359ba386285e
+ checksum: d5ae1da2428ed5a80bb5508235b80f1b812174036387c13c780398e179ed9aae07b048cbe87e93f71e74b8a520b6b2915b979a30da1a2293b97045a9343d79f9
languageName: node
linkType: hard
@@ -4242,6 +4267,17 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/json-rpc-engine@npm:^7.1.1":
+ version: 7.1.1
+ resolution: "@metamask/json-rpc-engine@npm:7.1.1"
+ dependencies:
+ "@metamask/rpc-errors": "npm:^6.0.0"
+ "@metamask/safe-event-emitter": "npm:^3.0.0"
+ "@metamask/utils": "npm:^8.1.0"
+ checksum: 91320ab6bdc4577a96b26b1b06e71b77c65abbc02fd8d30c53a8a63d93b28cb82619031cc45542085b94f7115d46e3dcb16620fa5f5cb1f387cb3bebcff36ae9
+ languageName: node
+ linkType: hard
+
"@metamask/key-tree@npm:^7.1.1":
version: 7.1.1
resolution: "@metamask/key-tree@npm:7.1.1"
@@ -4270,18 +4306,19 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/keyring-api@npm:^0.1.3":
- version: 0.1.3
- resolution: "@metamask/keyring-api@npm:0.1.3"
+"@metamask/keyring-api@npm:^0.2.3":
+ version: 0.2.4
+ resolution: "@metamask/keyring-api@npm:0.2.4"
dependencies:
- "@metamask/providers": "npm:^11.0.0"
- "@metamask/snaps-controllers": "npm:^0.35.2-flask.1"
- "@metamask/snaps-utils": "npm:^0.35.2-flask.1"
- "@metamask/utils": "npm:^6.0.1"
+ "@metamask/providers": "npm:^12.0.0"
+ "@metamask/rpc-methods": "npm:^0.38.1-flask.1"
+ "@metamask/snaps-controllers": "npm:^0.38.2-flask.1"
+ "@metamask/snaps-utils": "npm:^0.38.2-flask.1"
+ "@metamask/utils": "npm:^8.1.0"
"@types/uuid": "npm:^9.0.1"
superstruct: "npm:^1.0.3"
uuid: "npm:^9.0.0"
- checksum: 96c3101482c795f910ebe8b7cd25cdb391d03e4fa46f2918afeb8125953eec0208b7ebddd43487f8ec4f3febecba3327624a5dc8c2a0a9571052d16fef75dfcd
+ checksum: d61e2bf7252135e5bb099bb10886fcbd4c25392e3bfe9beb267b57f97e653b687e727fd67726492723837b66c40cd226e2539c5a80ebfbe1e56ebf9e93f93728
languageName: node
linkType: hard
@@ -4611,7 +4648,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/providers@npm:^11.0.0, @metamask/providers@npm:^11.1.0, @metamask/providers@npm:^11.1.1":
+"@metamask/providers@npm:^11.1.0, @metamask/providers@npm:^11.1.1":
version: 11.1.2
resolution: "@metamask/providers@npm:11.1.2"
dependencies:
@@ -4630,6 +4667,26 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/providers@npm:^12.0.0":
+ version: 12.0.0
+ resolution: "@metamask/providers@npm:12.0.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"
+ pump: "npm:^3.0.0"
+ webextension-polyfill: "npm:^0.10.0"
+ checksum: 8c3895593a71de6e165276f00069b57f83b5bb6991b6bb9444ae556d0ceb3252d56b546eb136b19b854b919c4368bf30b37c993da8904ea8ddf200323759e715
+ languageName: node
+ linkType: hard
+
"@metamask/rate-limit-controller@npm:^3.0.0":
version: 3.0.0
resolution: "@metamask/rate-limit-controller@npm:3.0.0"
@@ -4651,6 +4708,16 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/rpc-errors@npm:^6.0.0":
+ version: 6.0.0
+ resolution: "@metamask/rpc-errors@npm:6.0.0"
+ dependencies:
+ "@metamask/utils": "npm:^8.0.0"
+ fast-safe-stringify: "npm:^2.0.6"
+ checksum: f907a01d061fe9354fa88a1891adeb393505f7a679342fcbc46ec81385558ac1791b442c6b68f5df61765d7927b54b988f562b5dd2bfa09150d25d39298e3eaa
+ languageName: node
+ linkType: hard
+
"@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.38.3-flask.1, @metamask/rpc-methods@npm:^0.38.3-flask.1":
version: 0.38.3-flask.1
resolution: "@metamask/rpc-methods@npm:0.38.3-flask.1"
@@ -4668,21 +4735,20 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/rpc-methods@npm:^0.35.2-flask.1":
- version: 0.35.2-flask.1
- resolution: "@metamask/rpc-methods@npm:0.35.2-flask.1"
+"@metamask/rpc-methods@npm:^0.38.1-flask.1":
+ version: 0.38.1-flask.1
+ resolution: "@metamask/rpc-methods@npm:0.38.1-flask.1"
dependencies:
- "@metamask/key-tree": "npm:^7.1.1"
- "@metamask/permission-controller": "npm:^4.0.0"
- "@metamask/snaps-ui": "npm:^0.35.2-flask.1"
- "@metamask/snaps-utils": "npm:^0.35.2-flask.1"
+ "@metamask/key-tree": "npm:^9.0.0"
+ "@metamask/permission-controller": "npm:^4.1.0"
+ "@metamask/snaps-ui": "npm:^0.37.4-flask.1"
+ "@metamask/snaps-utils": "npm:^0.38.2-flask.1"
"@metamask/types": "npm:^1.1.0"
"@metamask/utils": "npm:^6.0.1"
"@noble/hashes": "npm:^1.3.1"
eth-rpc-errors: "npm:^4.0.3"
- nanoid: "npm:^3.1.31"
superstruct: "npm:^1.0.3"
- checksum: c9d87bcefafb8dfbdaa1e11a1e41b089d6aa4e7ed14034ef482b64b448387e86188671cda314a11ae0b29ee8c9bb7459e43841d197c5e998d2209e383c686f1d
+ checksum: b28adc2fe7e08a58f7760ffbd67bd365f2bed8e7b34857c83ed125d9f7204dbca6edfa5d8776dafbdf4a7862d3ef828079afbba857f0d4eca1ba273f655687da
languageName: node
linkType: hard
@@ -4832,23 +4898,22 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-controllers@npm:^0.35.2-flask.1":
- version: 0.35.2-flask.1
- resolution: "@metamask/snaps-controllers@npm:0.35.2-flask.1"
+"@metamask/snaps-controllers@npm:^0.38.2-flask.1":
+ version: 0.38.2-flask.1
+ resolution: "@metamask/snaps-controllers@npm:0.38.2-flask.1"
dependencies:
- "@metamask/approval-controller": "npm:^3.0.0"
- "@metamask/base-controller": "npm:^3.0.0"
+ "@metamask/approval-controller": "npm:^3.5.0"
+ "@metamask/base-controller": "npm:^3.2.0"
"@metamask/object-multiplex": "npm:^1.2.0"
- "@metamask/permission-controller": "npm:^4.0.0"
+ "@metamask/permission-controller": "npm:^4.1.0"
"@metamask/post-message-stream": "npm:^6.1.2"
- "@metamask/rpc-methods": "npm:^0.35.2-flask.1"
- "@metamask/snaps-execution-environments": "npm:^0.35.2-flask.1"
+ "@metamask/rpc-methods": "npm:^0.38.1-flask.1"
+ "@metamask/snaps-execution-environments": "npm:^0.38.2-flask.1"
"@metamask/snaps-registry": "npm:^1.2.1"
- "@metamask/snaps-utils": "npm:^0.35.2-flask.1"
+ "@metamask/snaps-utils": "npm:^0.38.2-flask.1"
"@metamask/utils": "npm:^6.0.1"
"@xstate/fsm": "npm:^2.0.0"
concat-stream: "npm:^2.0.0"
- cron-parser: "npm:^4.5.0"
eth-rpc-errors: "npm:^4.0.3"
gunzip-maybe: "npm:^1.4.2"
immer: "npm:^9.0.6"
@@ -4858,7 +4923,7 @@ __metadata:
pump: "npm:^3.0.0"
readable-web-to-node-stream: "npm:^3.0.2"
tar-stream: "npm:^2.2.0"
- checksum: e9bf758727960e321a36b6407f66a20c6b2095bed3ca70d24c46a261e5bbd8296856d520c950ac881650db28de490e07485afeaadd17c2bdd5c29f7de374f939
+ checksum: 62f555c24b5200f082e796f8cc53a326dc35a34bd94fc98f66bef1160f2f3b78a9c71e2d2548687d043817df982433f794da4a012ef3230c4604f7ce2781159a
languageName: node
linkType: hard
@@ -4892,24 +4957,22 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-execution-environments@npm:^0.35.2-flask.1":
- version: 0.35.2-flask.1
- resolution: "@metamask/snaps-execution-environments@npm:0.35.2-flask.1"
+"@metamask/snaps-execution-environments@npm:^0.38.2-flask.1":
+ version: 0.38.2-flask.1
+ resolution: "@metamask/snaps-execution-environments@npm:0.38.2-flask.1"
dependencies:
"@metamask/object-multiplex": "npm:^1.2.0"
"@metamask/post-message-stream": "npm:^6.1.2"
- "@metamask/providers": "npm:^11.0.0"
- "@metamask/rpc-methods": "npm:^0.35.2-flask.1"
- "@metamask/snaps-utils": "npm:^0.35.2-flask.1"
+ "@metamask/providers": "npm:^11.1.1"
+ "@metamask/rpc-methods": "npm:^0.38.1-flask.1"
+ "@metamask/snaps-utils": "npm:^0.38.2-flask.1"
"@metamask/utils": "npm:^6.0.1"
eth-rpc-errors: "npm:^4.0.3"
json-rpc-engine: "npm:^6.1.0"
nanoid: "npm:^3.1.31"
pump: "npm:^3.0.0"
- ses: "npm:^0.18.1"
- stream-browserify: "npm:^3.0.0"
superstruct: "npm:^1.0.3"
- checksum: 9848e0310470290c976f54c785622cbaca60e95f866cfbdaf9b277e4f4f49fb864e6b7af8453beb9b322966dd7fb8699223ba7ecff7cdee38cb466572071d90e
+ checksum: ae8f8991d5911cb4eff0145ab136549467f5e904f3530653dbb678f52a71f0a2bc17646b57ae0aceb9848db56e1fd110cef5c24916f247ac8d3e9eaac2cee6f3
languageName: node
linkType: hard
@@ -4983,13 +5046,13 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-ui@npm:^0.35.2-flask.1":
- version: 0.35.2-flask.1
- resolution: "@metamask/snaps-ui@npm:0.35.2-flask.1"
+"@metamask/snaps-ui@npm:^0.37.4-flask.1":
+ version: 0.37.4-flask.1
+ resolution: "@metamask/snaps-ui@npm:0.37.4-flask.1"
dependencies:
"@metamask/utils": "npm:^6.0.1"
superstruct: "npm:^1.0.3"
- checksum: 30833668bb832cb8cf4a377d2dea132d5fab3eed8d4d7d77ee40cce6bc38f3a65327f210e7336734b28253d8fd9182868b9e040fb56703f39ad5a9f5b1ad3606
+ checksum: e57ca1e375d0c7860f198143789226552cb449a654e97b639f90a0cb577f9d46387c7c65b5dacc05b7fa613ed8499021df286590b6c633b6f5be8578d4d9f6a9
languageName: node
linkType: hard
@@ -5032,32 +5095,32 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-utils@npm:^0.35.2-flask.1":
- version: 0.35.2-flask.1
- resolution: "@metamask/snaps-utils@npm:0.35.2-flask.1"
+"@metamask/snaps-utils@npm:^0.38.2-flask.1":
+ version: 0.38.2-flask.1
+ resolution: "@metamask/snaps-utils@npm:0.38.2-flask.1"
dependencies:
"@babel/core": "npm:^7.20.12"
"@babel/types": "npm:^7.18.7"
- "@metamask/base-controller": "npm:^3.0.0"
- "@metamask/key-tree": "npm:^7.1.1"
- "@metamask/permission-controller": "npm:^4.0.0"
- "@metamask/providers": "npm:^11.0.0"
+ "@metamask/base-controller": "npm:^3.2.0"
+ "@metamask/key-tree": "npm:^9.0.0"
+ "@metamask/permission-controller": "npm:^4.1.0"
"@metamask/snaps-registry": "npm:^1.2.1"
- "@metamask/snaps-ui": "npm:^0.35.2-flask.1"
+ "@metamask/snaps-ui": "npm:^0.37.4-flask.1"
"@metamask/utils": "npm:^6.0.1"
"@noble/hashes": "npm:^1.3.1"
"@scure/base": "npm:^1.1.1"
+ chalk: "npm:^4.1.2"
cron-parser: "npm:^4.5.0"
eth-rpc-errors: "npm:^4.0.3"
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.3.7"
- ses: "npm:^0.18.1"
+ semver: "npm:^7.5.4"
+ ses: "npm:^0.18.7"
superstruct: "npm:^1.0.3"
validate-npm-package-name: "npm:^5.0.0"
- checksum: 674a2bb4c06025307f94e1749d9ba2fd443b4e79f5ae995038e639b32c795aef7a858216fe61a4eff277de01f37a1d539d78b2d35bdf75fbf6712d61aa053fb8
+ checksum: 9f488976851c7bf6c1bebaa12a2542c651bb44a7df9901ee89b6e2aed0d610a9417c1994a7aa840fb321fb66dd6c2b2148035e9205f005aab22d29d47427c957
languageName: node
linkType: hard
@@ -5159,7 +5222,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/utils@npm:^6.0.1, @metamask/utils@npm:^6.1.0, @metamask/utils@npm:^6.2.0":
+"@metamask/utils@npm:^6.0.1, @metamask/utils@npm:^6.2.0":
version: 6.2.0
resolution: "@metamask/utils@npm:6.2.0"
dependencies:
@@ -5187,7 +5250,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/utils@npm:^8.1.0":
+"@metamask/utils@npm:^8.0.0, @metamask/utils@npm:^8.1.0":
version: 8.1.0
resolution: "@metamask/utils@npm:8.1.0"
dependencies:
@@ -5234,12 +5297,12 @@ __metadata:
languageName: node
linkType: hard
-"@noble/curves@npm:1.0.0, @noble/curves@npm:~1.0.0":
- version: 1.0.0
- resolution: "@noble/curves@npm:1.0.0"
+"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0":
+ version: 1.1.0
+ resolution: "@noble/curves@npm:1.1.0"
dependencies:
- "@noble/hashes": "npm:1.3.0"
- checksum: 6db884e03b3f6c773317bcf4611bf1d9adb8084eab0bf6158407cc998c9c5dcb0560741bdd0aaca9c4393c9e8a3dcd7592b4148a6cfd561d0a00addb77a6129f
+ "@noble/hashes": "npm:1.3.1"
+ checksum: 7028e3f19a4a2a601f9159e5423f51ae86ab231bed79a6e40649b063e1ed7f55f5da0475f1377bd2c5a8e5fc485af9ce0549ad89da6b983d6af48e5d0a2041ca
languageName: node
linkType: hard
@@ -5257,20 +5320,20 @@ __metadata:
languageName: node
linkType: hard
-"@noble/hashes@npm:1.3.0":
- version: 1.3.0
- resolution: "@noble/hashes@npm:1.3.0"
- checksum: 4680a71941c06ac897cc9eab9d229717d5af1147cea5e8cd4942190c817426ad3173ded750d897f58d764b869f9347d4fc3f6b3c16574541ac81906efa9ddc36
- languageName: node
- linkType: hard
-
-"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.3, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0":
+"@noble/hashes@npm:1.3.1":
version: 1.3.1
resolution: "@noble/hashes@npm:1.3.1"
checksum: 39474bab7e7813dbbfd8750476f48046d3004984e161fcd4333e40ca823f07b069010b35a20246e5b4ac20858e29913172a4d69720fd1e93620f7bedb70f9b72
languageName: node
linkType: hard
+"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.3, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1":
+ version: 1.3.2
+ resolution: "@noble/hashes@npm:1.3.2"
+ checksum: 685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b
+ languageName: node
+ linkType: hard
+
"@noble/hashes@npm:~1.1.1":
version: 1.1.3
resolution: "@noble/hashes@npm:1.1.3"
@@ -5727,14 +5790,14 @@ __metadata:
languageName: node
linkType: hard
-"@scure/bip32@npm:1.3.0":
- version: 1.3.0
- resolution: "@scure/bip32@npm:1.3.0"
+"@scure/bip32@npm:1.3.1":
+ version: 1.3.1
+ resolution: "@scure/bip32@npm:1.3.1"
dependencies:
- "@noble/curves": "npm:~1.0.0"
- "@noble/hashes": "npm:~1.3.0"
+ "@noble/curves": "npm:~1.1.0"
+ "@noble/hashes": "npm:~1.3.1"
"@scure/base": "npm:~1.1.0"
- checksum: 1fabcc7f2215910b35980bfc455c03fc4ae7f848efed066fe3867960a8dfceb6141c932496434fc2cfbf385d270ff9efdfce2571992e4584103f82e45ac2103f
+ checksum: 0595955374dfa54a60adfa33d4793fd8b27230e962aaceb5bb5fcf8ccbb935184aa2c45154ec9bdfb26a1877b2ae0a8e4808c9a5464d4ffd971120740b816def
languageName: node
linkType: hard
@@ -5748,13 +5811,13 @@ __metadata:
languageName: node
linkType: hard
-"@scure/bip39@npm:1.2.0":
- version: 1.2.0
- resolution: "@scure/bip39@npm:1.2.0"
+"@scure/bip39@npm:1.2.1":
+ version: 1.2.1
+ resolution: "@scure/bip39@npm:1.2.1"
dependencies:
"@noble/hashes": "npm:~1.3.0"
"@scure/base": "npm:~1.1.0"
- checksum: 2a260eefea0b2658c5d3b2cb982479ef650552c3007e57f667b445943c79717eb923c1a104a664b4873bc210aeb59859bf890c3e7b47fb51ed5b94dc96f75105
+ checksum: 2ea368bbed34d6b1701c20683bf465e147f231a9e37e639b8c82f585d6f978bb0f3855fca7ceff04954ae248b3e313f5d322d0210614fb7acb402739415aaf31
languageName: node
linkType: hard
@@ -16121,15 +16184,15 @@ __metadata:
languageName: node
linkType: hard
-"ethereum-cryptography@npm:^2.0.0":
- version: 2.0.0
- resolution: "ethereum-cryptography@npm:2.0.0"
+"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2":
+ version: 2.1.2
+ resolution: "ethereum-cryptography@npm:2.1.2"
dependencies:
- "@noble/curves": "npm:1.0.0"
- "@noble/hashes": "npm:1.3.0"
- "@scure/bip32": "npm:1.3.0"
- "@scure/bip39": "npm:1.2.0"
- checksum: 1f87b4d322fce0801d38741955df1dec20861939ea0c0a89dddf182906f21453f7134662e09fe268e35be9a3848f61667349836b5eb5f4efd6b9a02c1e3bcc85
+ "@noble/curves": "npm:1.1.0"
+ "@noble/hashes": "npm:1.3.1"
+ "@scure/bip32": "npm:1.3.1"
+ "@scure/bip39": "npm:1.2.1"
+ checksum: 78983d01ac95047158ec03237ba318152b2c707ccc6a44225da11c72ed6ca575ca0c1630eaf9878fc82fe26272d6624939ef6f020cc89ddddfb941a7393ab909
languageName: node
linkType: hard
@@ -16956,13 +17019,13 @@ __metadata:
linkType: hard
"fast-xml-parser@npm:^4.1.3":
- version: 4.2.4
- resolution: "fast-xml-parser@npm:4.2.4"
+ version: 4.2.5
+ resolution: "fast-xml-parser@npm:4.2.5"
dependencies:
strnum: "npm:^1.0.5"
bin:
fxparser: src/cli/cli.js
- checksum: 157f64a142d37f2c937d5308d62668119e40218dab41a07d1a9563c3f92663c81fd08db0efc9fe484e0bc4dfea59827f319adc510426ff9b97c83a779d511b6f
+ checksum: 4be7ebe24d6a9a60c278e1423cd86a7da9a77ec64c95563e2c552363caf7a777e0c87c9de1255c2f4e8dea9bce8905dc2bdc58a34e9f2b73c4693654456ad284
languageName: node
linkType: hard
@@ -24153,7 +24216,7 @@ __metadata:
"@metamask/eth-json-rpc-middleware": "npm:^11.0.0"
"@metamask/eth-keyring-controller": "npm:^10.0.1"
"@metamask/eth-ledger-bridge-keyring": "npm:^0.15.0"
- "@metamask/eth-snap-keyring": "npm:^0.1.4"
+ "@metamask/eth-snap-keyring": "npm:^0.2.2"
"@metamask/eth-token-tracker": "npm:^4.0.0"
"@metamask/eth-trezor-keyring": "npm:^1.1.0"
"@metamask/etherscan-link": "npm:^2.2.0"
From da7dcb65e75f19ab1e57ffbad862502470033fe4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?=
Date: Fri, 22 Sep 2023 09:48:02 +0100
Subject: [PATCH 038/137] [MMI] clean up MMI Portfolio Dashboard URLs (#20990)
* clean up urls
* test update
* lint
---
shared/constants/swaps.ts | 2 --
ui/components/app/wallet-overview/eth-overview.js | 9 +++++----
ui/components/app/wallet-overview/eth-overview.test.js | 10 +++++++---
ui/components/app/wallet-overview/token-overview.js | 9 +++++----
.../select-action-modal/select-action-modal.js | 10 ++++++----
ui/helpers/constants/common.ts | 1 -
6 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/shared/constants/swaps.ts b/shared/constants/swaps.ts
index 73e2926e7143..1b60dc8f95fc 100644
--- a/shared/constants/swaps.ts
+++ b/shared/constants/swaps.ts
@@ -142,8 +142,6 @@ export const WETH_ZKSYNC_ERA_CONTRACT_ADDRESS =
const SWAPS_TESTNET_CHAIN_ID = '0x539';
-export const MMI_SWAPS_URL = 'https://metamask-institutional.io/swap';
-
export const SWAPS_API_V2_BASE_URL = 'https://swap.metaswap.codefi.network';
export const SWAPS_DEV_API_V2_BASE_URL = 'https://swap.dev-api.cx.metamask.io';
export const GAS_API_BASE_URL = 'https://gas-api.metaswap.codefi.network';
diff --git a/ui/components/app/wallet-overview/eth-overview.js b/ui/components/app/wallet-overview/eth-overview.js
index 4c10a8edded0..15695dd237b5 100644
--- a/ui/components/app/wallet-overview/eth-overview.js
+++ b/ui/components/app/wallet-overview/eth-overview.js
@@ -14,7 +14,6 @@ import {
getMmiPortfolioEnabled,
getMmiPortfolioUrl,
} from '../../../selectors/institutional/selectors';
-import { MMI_SWAPS_URL } from '../../../../shared/constants/swaps';
///: END:ONLY_INCLUDE_IN
import { I18nContext } from '../../../contexts/i18n';
import {
@@ -112,7 +111,7 @@ const EthOverview = ({ className, showAddress }) => {
onClick={() => {
stakingEvent();
global.platform.openTab({
- url: 'https://metamask-institutional.io/stake',
+ url: `${mmiPortfolioUrl}/stake`,
});
}}
/>
@@ -125,7 +124,9 @@ const EthOverview = ({ className, showAddress }) => {
label={t('portfolio')}
onClick={() => {
portfolioEvent();
- window.open(mmiPortfolioUrl, '_blank');
+ global.platform.openTab({
+ url: mmiPortfolioUrl,
+ });
}}
/>
)}
@@ -262,7 +263,7 @@ const EthOverview = ({ className, showAddress }) => {
onClick={() => {
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
global.platform.openTab({
- url: MMI_SWAPS_URL,
+ url: `${mmiPortfolioUrl}/swap`,
});
///: END:ONLY_INCLUDE_IN
diff --git a/ui/components/app/wallet-overview/eth-overview.test.js b/ui/components/app/wallet-overview/eth-overview.test.js
index 32e73fbee9a9..bad0339b6ed7 100644
--- a/ui/components/app/wallet-overview/eth-overview.test.js
+++ b/ui/components/app/wallet-overview/eth-overview.test.js
@@ -196,6 +196,12 @@ describe('EthOverview', () => {
const mockedStoreWithCustodyKeyring = {
metamask: {
...mockStore.metamask,
+ mmiConfiguration: {
+ portfolio: {
+ enabled: true,
+ url: 'https://metamask-institutional.io',
+ },
+ },
keyrings: [
{
type: 'Custody',
@@ -224,9 +230,7 @@ describe('EthOverview', () => {
await waitFor(() =>
expect(openTabSpy).toHaveBeenCalledWith({
- url: expect.stringContaining(
- 'https://metamask-institutional.io/swap',
- ),
+ url: 'https://metamask-institutional.io/swap',
}),
);
});
diff --git a/ui/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js
index cb7fcc4fd9a2..650404c86c5f 100644
--- a/ui/components/app/wallet-overview/token-overview.js
+++ b/ui/components/app/wallet-overview/token-overview.js
@@ -25,7 +25,6 @@ import {
getMmiPortfolioEnabled,
getMmiPortfolioUrl,
} from '../../../selectors/institutional/selectors';
-import { MMI_SWAPS_URL } from '../../../../shared/constants/swaps';
///: END:ONLY_INCLUDE_IN
import {
getIsSwapsChain,
@@ -178,7 +177,7 @@ const TokenOverview = ({ className, token }) => {
onClick={() => {
stakingEvent();
global.platform.openTab({
- url: 'https://metamask-institutional.io/stake',
+ url: `${mmiPortfolioUrl}/stake`,
});
}}
/>
@@ -195,7 +194,9 @@ const TokenOverview = ({ className, token }) => {
data-testid="token-overview-mmi-portfolio"
onClick={() => {
portfolioEvent();
- window.open(mmiPortfolioUrl, '_blank');
+ global.platform.openTab({
+ url: mmiPortfolioUrl,
+ });
}}
/>
)}
@@ -252,7 +253,7 @@ const TokenOverview = ({ className, token }) => {
onClick={() => {
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
global.platform.openTab({
- url: MMI_SWAPS_URL,
+ url: `${mmiPortfolioUrl}/swap`,
});
///: END:ONLY_INCLUDE_IN
diff --git a/ui/components/multichain/select-action-modal/select-action-modal.js b/ui/components/multichain/select-action-modal/select-action-modal.js
index 404549292110..3a5ca27c5fc9 100644
--- a/ui/components/multichain/select-action-modal/select-action-modal.js
+++ b/ui/components/multichain/select-action-modal/select-action-modal.js
@@ -49,9 +49,9 @@ import { startNewDraftTransaction } from '../../../ducks/send';
import { I18nContext } from '../../../contexts/i18n';
import { AssetType } from '../../../../shared/constants/transaction';
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
-import { MMI_SWAPS_URL } from '../../../../shared/constants/swaps';
-import { MMI_STAKE_WEBSITE } from '../../../helpers/constants/common';
+import { getMmiPortfolioUrl } from '../../../selectors/institutional/selectors';
///: END:ONLY_INCLUDE_IN
+
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
import { setSwapsFromToken } from '../../../ducks/swaps/swaps';
import { isHardwareKeyring } from '../../../helpers/utils/hardware';
@@ -79,6 +79,8 @@ export const SelectActionModal = ({ onClose }) => {
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
+ const mmiPortfolioUrl = useSelector(getMmiPortfolioUrl);
+
const stakingEvent = () => {
trackEvent({
category: MetaMetricsEventCategory.Navigation,
@@ -136,7 +138,7 @@ export const SelectActionModal = ({ onClose }) => {
onClick={() => {
stakingEvent();
global.platform.openTab({
- url: MMI_STAKE_WEBSITE,
+ url: `${mmiPortfolioUrl}/stake`,
});
onClose();
}}
@@ -152,7 +154,7 @@ export const SelectActionModal = ({ onClose }) => {
onClick={() => {
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
global.platform.openTab({
- url: MMI_SWAPS_URL,
+ url: `${mmiPortfolioUrl}/swap`,
});
///: END:ONLY_INCLUDE_IN
diff --git a/ui/helpers/constants/common.ts b/ui/helpers/constants/common.ts
index f59f451660e7..eb1b4946750f 100644
--- a/ui/helpers/constants/common.ts
+++ b/ui/helpers/constants/common.ts
@@ -7,7 +7,6 @@ const _contractAddressLink =
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
const _mmiWebSite = 'https://metamask.io/institutions/';
export const MMI_WEB_SITE = _mmiWebSite;
-export const MMI_STAKE_WEBSITE = 'https://metamask-institutional.io/stake';
///: END:ONLY_INCLUDE_IN
// eslint-disable-next-line prefer-destructuring
From 97bb2c492b1e8d4a3cc0d3e7dfd15468f6325f65 Mon Sep 17 00:00:00 2001
From: Pedro Figueiredo
Date: Fri, 22 Sep 2023 10:36:48 +0100
Subject: [PATCH 039/137] fix: Incoming tx on activity tab when transfering
funds between wallets on the same client (#20973)
* fix incoming tx filtering
* tweak filtering
* tweak filtering
* tweak filtering
* tweak filtering
* refactor filtering on activity list
* simplify solution
* update comment
* reintroduce filtering and address comments
* fix linting errors
* fix test
* fix comment
* wip
* wip
---
app/scripts/controllers/transactions/index.js | 21 +++-
.../controllers/transactions/index.test.js | 31 +++++-
.../transaction-list.component.js | 97 +++++++++++++------
3 files changed, 115 insertions(+), 34 deletions(-)
diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js
index c6238f0b8a15..f4eee8a6ee92 100644
--- a/app/scripts/controllers/transactions/index.js
+++ b/app/scripts/controllers/transactions/index.js
@@ -2791,7 +2791,9 @@ export default class TransactionController extends EventEmitter {
const currentTransactions = this.store.getState().transactions || {};
const incomingTransactions = transactions
- .filter((tx) => !this._hasTransactionHash(tx.hash, currentTransactions))
+ .filter((tx) =>
+ this._hasNoDuplicateIncoming(tx.hash, currentTransactions),
+ )
.reduce((result, tx) => {
result[tx.id] = tx;
return result;
@@ -2809,8 +2811,21 @@ export default class TransactionController extends EventEmitter {
this.store.updateState({ lastFetchedBlockNumbers });
}
- _hasTransactionHash(hash, transactions) {
- return Object.values(transactions).some((tx) => tx.hash === hash);
+ /**
+ * This function checks if there is not any transaction in the provided
+ * transactions object that has the same hash as the provided txHash and has a
+ * type of 'incoming'.
+ *
+ * @param {string} txHash - The transaction hash to compare with.
+ * @param {object} transactions - The transactions to check in.
+ * @returns {boolean} Returns false if there is a transaction that has the
+ * same hash as the provided txHash and has a type of 'incoming'. Otherwise,
+ * it returns true.
+ */
+ _hasNoDuplicateIncoming(txHash, transactions) {
+ return !Object.values(transactions).some(
+ (tx) => tx.hash === txHash && tx.type === TransactionType.incoming,
+ );
}
// Approvals
diff --git a/app/scripts/controllers/transactions/index.test.js b/app/scripts/controllers/transactions/index.test.js
index d882b1064698..046ed4bae3ad 100644
--- a/app/scripts/controllers/transactions/index.test.js
+++ b/app/scripts/controllers/transactions/index.test.js
@@ -3426,13 +3426,34 @@ describe('Transaction Controller', function () {
});
});
- it('ignores new transactions if hash matches existing transaction', async function () {
- const existingTransaction = TRANSACTION_META_MOCK;
- const incomingTransaction1 = { ...TRANSACTION_META_MOCK, id: 2 };
- const incomingTransaction2 = { ...TRANSACTION_META_MOCK, id: 3 };
+ it('ignores new transactions if hash matches existing incoming transaction', async function () {
+ const existingTransaction = {
+ ...TRANSACTION_META_MOCK,
+ id: 1,
+ type: TransactionType.incoming,
+ };
+ const existingTransaction2 = {
+ ...TRANSACTION_META_MOCK,
+ id: 2,
+ hash: '0xNewHash',
+ type: TransactionType.simpleSend,
+ };
+
+ const incomingTransaction1 = {
+ ...TRANSACTION_META_MOCK,
+ id: 3,
+ type: TransactionType.incoming,
+ };
+ const incomingTransaction2 = {
+ ...TRANSACTION_META_MOCK,
+ id: 4,
+ hash: '0xNewHash',
+ type: TransactionType.incoming,
+ };
txController.store.getState().transactions = {
[existingTransaction.id]: existingTransaction,
+ [existingTransaction2.id]: existingTransaction2,
};
await incomingTransactionHelperEventMock.firstCall.args[1]({
@@ -3442,6 +3463,8 @@ describe('Transaction Controller', function () {
assert.deepEqual(txController.store.getState().transactions, {
[existingTransaction.id]: existingTransaction,
+ [existingTransaction2.id]: existingTransaction2,
+ [incomingTransaction2.id]: incomingTransaction2,
});
});
});
diff --git a/ui/components/app/transaction-list/transaction-list.component.js b/ui/components/app/transaction-list/transaction-list.component.js
index 93111fa6a8e8..cc0db825dba3 100644
--- a/ui/components/app/transaction-list/transaction-list.component.js
+++ b/ui/components/app/transaction-list/transaction-list.component.js
@@ -5,7 +5,7 @@ import {
nonceSortedCompletedTransactionsSelector,
nonceSortedPendingTransactionsSelector,
} from '../../../selectors/transactions';
-import { getCurrentChainId } from '../../../selectors';
+import { getCurrentChainId, getSelectedAddress } 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,6 +113,7 @@ export default function TransactionList({
nonceSortedCompletedTransactionsSelector,
);
const chainId = useSelector(getCurrentChainId);
+ const selectedAddress = useSelector(getSelectedAddress);
const renderDateStamp = (index, dateGroup) => {
return index === 0 ? (
{
+ const isIncomingTxsButToAnotherAddress = (transaction) =>
+ transaction.type === TransactionType.incoming &&
+ transaction.txParams.to.toLowerCase() !== selectedAddress.toLowerCase();
+
+ dateGroup.transactionGroups = dateGroup.transactionGroups.map(
+ (transactionGroup) => {
+ transactionGroup.transactions = transactionGroup.transactions.filter(
+ (transaction) => !isIncomingTxsButToAnotherAddress(transaction),
+ );
+
+ return transactionGroup;
+ },
+ );
+
+ return dateGroup;
+ };
+
+ // Remove transaction groups with no transactions
+ const removeTxGroupsWithNoTx = (dateGroup) => {
+ dateGroup.transactionGroups = dateGroup.transactionGroups.filter(
+ (transactionGroup) => {
+ return transactionGroup.transactions.length > 0;
+ },
+ );
+
+ return dateGroup;
+ };
+
+ // Remove date groups with no transaction groups
+ const dateGroupsWithTransactionGroups = (dateGroup) =>
+ dateGroup.transactionGroups.length > 0;
+
return (
@@ -209,32 +245,39 @@ export default function TransactionList({
)}
{completedTransactions.length > 0 ? (
- completedTransactions.slice(0, limit).map((dateGroup) => {
- return dateGroup.transactionGroups.map(
- (transactionGroup, index) => {
- return (
- <>
- {renderDateStamp(index, dateGroup)}
- {transactionGroup.initialTransaction?.transactionType ===
- TransactionType.smart ? (
-
- ) : (
-
- )}
- >
- );
- },
- );
- })
+ completedTransactions
+ .map(removeIncomingTxsButToAnotherAddress)
+ .map(removeTxGroupsWithNoTx)
+ .filter(dateGroupsWithTransactionGroups)
+ .slice(0, limit)
+ .map((dateGroup) => {
+ return dateGroup.transactionGroups.map(
+ (transactionGroup, index) => {
+ return (
+ <>
+ {renderDateStamp(index, dateGroup)}
+ {transactionGroup.initialTransaction
+ ?.transactionType === TransactionType.smart ? (
+
+ ) : (
+
+ )}
+ >
+ );
+ },
+ );
+ })
) : (
From 1e65bb81683e3852d53ef6d835cac1c9798fb4bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?=
Date: Fri, 22 Sep 2023 13:17:33 +0100
Subject: [PATCH 040/137] [MMI] fix property name and filter out custodian
(#21004)
* prettier
* fix test
---
ui/helpers/utils/institutional/find-by-custodian-name.ts | 7 +++++--
ui/pages/institutional/custody/custody.js | 8 +++++---
ui/pages/institutional/custody/custody.test.js | 6 ++++--
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/ui/helpers/utils/institutional/find-by-custodian-name.ts b/ui/helpers/utils/institutional/find-by-custodian-name.ts
index bdd58d0cbcd2..6e804295dd53 100644
--- a/ui/helpers/utils/institutional/find-by-custodian-name.ts
+++ b/ui/helpers/utils/institutional/find-by-custodian-name.ts
@@ -24,9 +24,12 @@ export function findCustodianByDisplayName(
}
for (const custodian of custodians) {
- const custodianName = custodian.envName.toLowerCase();
+ const custodianName = custodian.name.toLowerCase();
- if (formatedDisplayName.includes(custodianName)) {
+ if (
+ custodianName.length !== 0 &&
+ formatedDisplayName.includes(custodianName)
+ ) {
return custodian;
}
}
diff --git a/ui/pages/institutional/custody/custody.js b/ui/pages/institutional/custody/custody.js
index 094d0a5f6016..8343b41ffcdf 100644
--- a/ui/pages/institutional/custody/custody.js
+++ b/ui/pages/institutional/custody/custody.js
@@ -95,9 +95,11 @@ const CustodyPage = () => {
const custodianButtons = useMemo(() => {
const custodianItems = [];
- const sortedCustodians = [...custodians].sort((a, b) =>
- a.envName.toLowerCase().localeCompare(b.envName.toLowerCase()),
- );
+ const sortedCustodians = [...custodians]
+ .filter((item) => item.type !== 'Jupiter')
+ .sort((a, b) =>
+ a.envName.toLowerCase().localeCompare(b.envName.toLowerCase()),
+ );
function shouldShowInProduction(custodian) {
return (
diff --git a/ui/pages/institutional/custody/custody.test.js b/ui/pages/institutional/custody/custody.test.js
index 800e6a0956d1..fea5460a32f4 100644
--- a/ui/pages/institutional/custody/custody.test.js
+++ b/ui/pages/institutional/custody/custody.test.js
@@ -43,7 +43,8 @@ describe('CustodyPage', function () {
custodians: [
{
type: 'GK8',
- envName: 'gk8',
+ envName: 'gk8-prod',
+ name: 'GK8',
apiUrl: 'https://saturn-custody.dev.metamask-institutional.io',
iconUrl:
'https://saturn-custody-ui.dev.metamask-institutional.io/saturn.svg',
@@ -56,7 +57,8 @@ describe('CustodyPage', function () {
},
{
type: 'Saturn B',
- envName: 'Saturn Custody B',
+ envName: 'saturn-prod',
+ name: 'Saturn Custody B',
apiUrl: 'https://saturn-custody.dev.metamask-institutional.io',
iconUrl:
'https://saturn-custody-ui.dev.metamask-institutional.io/saturn.svg',
From 492a949b6b86ee123f678e1197c53bec6a53d42c Mon Sep 17 00:00:00 2001
From: Dhruv <79097544+dhruvv173@users.noreply.github.com>
Date: Fri, 22 Sep 2023 18:55:16 +0530
Subject: [PATCH 041/137] Updating ModalContent to use TS version of Box
(#20922)
## Explanation
- fixes #20160
## Screenshots/Screencaps
### Before
https://github.com/MetaMask/metamask-extension/assets/79097544/955dead9-39b2-4e7e-9a5f-daeeef1d4f8d
### After
https://github.com/MetaMask/metamask-extension/assets/79097544/9a143618-09f7-45d6-ab0f-71fa84270e64
![image](https://github.com/MetaMask/metamask-extension/assets/79097544/58002a13-8e60-4c24-82e4-bdb1b12c724a)
## Manual Testing Steps
## Pre-merge author checklist
- [x] I've clearly explained:
- [x] What problem this PR is solving
- [x] How this problem was solved
- [x] How reviewers can test my changes
- [x] Sufficient automated test coverage has been added
## Pre-merge reviewer checklist
- [ ] Manual testing (e.g. pull and build branch, run in browser, test
code being changed)
- [ ] PR is linked to the appropriate GitHub issue
- [ ] **IF** this PR fixes a bug in the release milestone, add this PR
to the release milestone
If further QA is required (e.g. new feature, complex testing steps,
large refactor), add the `Extension QA Board` label.
In this case, a QA Engineer approval will be be required.
---
.../modal-content/README.mdx | 8 +++-----
.../modal-content/modal-content.stories.tsx | 18 ++++++++---------
.../modal-content/modal-content.tsx | 20 ++++++++++++-------
.../modal-content/modal-content.types.ts | 14 +++++++++++--
4 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/ui/components/component-library/modal-content/README.mdx b/ui/components/component-library/modal-content/README.mdx
index 439525924ae8..6dceaea622d3 100644
--- a/ui/components/component-library/modal-content/README.mdx
+++ b/ui/components/component-library/modal-content/README.mdx
@@ -61,11 +61,9 @@ If you do require a larger modal size you can use the `modalDialogProps` to add
```jsx
-import { DISPLAY } from '../../../helpers/constants/design-system';
+import { Display } from '../../../helpers/constants/design-system';
-import Box from '../../ui/box';
-
-import { Modal, ModalContent, Text, Button, ButtonVariant } from '../../component-library';
+import { Box, Modal, ModalContent, Text, Button, ButtonVariant } from '../../component-library';
enum ModalContentSizeStoryOption {
Sm = 'sm',
@@ -80,7 +78,7 @@ const handleOnClick = (size: ModalContentSizeStoryOption) => {
setShow({ ...show, [size]: !show[size] });
};
-
+ handleOnClick(ModalContentSizeStoryOption.Sm)}
diff --git a/ui/components/component-library/modal-content/modal-content.stories.tsx b/ui/components/component-library/modal-content/modal-content.stories.tsx
index 71672733494e..4b090c5d576e 100644
--- a/ui/components/component-library/modal-content/modal-content.stories.tsx
+++ b/ui/components/component-library/modal-content/modal-content.stories.tsx
@@ -1,11 +1,9 @@
import React, { useState } from 'react';
-import { ComponentStory, ComponentMeta } from '@storybook/react';
+import { StoryFn, Meta } from '@storybook/react';
-import Box from '../../ui/box';
+import { Display } from '../../../helpers/constants/design-system';
-import { DISPLAY } from '../../../helpers/constants/design-system';
-
-import { ButtonVariant, Button, Text, Modal, ModalHeader } from '..';
+import { Box, ButtonVariant, Button, Text, Modal, ModalHeader } from '..';
import { ModalContent } from './modal-content';
import { ModalContentSize } from './modal-content.types';
@@ -26,7 +24,7 @@ export default {
options: Object.values(ModalContentSize),
},
},
-} as ComponentMeta;
+} as Meta;
const LoremIpsum = () => (
@@ -41,7 +39,7 @@ const LoremIpsum = () => (
);
-export const DefaultStory: ComponentStory = (args) => {
+export const DefaultStory: StoryFn = (args) => {
const [show, setShow] = useState(false);
const handleOnClick = () => {
setShow(!show);
@@ -66,7 +64,7 @@ export const DefaultStory: ComponentStory = (args) => {
DefaultStory.storyName = 'Default';
-export const Children: ComponentStory = (args) => {
+export const Children: StoryFn = (args) => {
const [show, setShow] = useState(false);
const handleOnClick = () => {
setShow(!show);
@@ -105,7 +103,7 @@ enum ModalContentSizeStoryOption {
ClassName = 'className',
}
-export const Size: ComponentStory = (args) => {
+export const Size: StoryFn = (args) => {
const [show, setShow] = useState({
sm: false,
className: false,
@@ -116,7 +114,7 @@ export const Size: ComponentStory = (args) => {
return (
<>
-
+ handleOnClick(ModalContentSizeStoryOption.Sm)}
diff --git a/ui/components/component-library/modal-content/modal-content.tsx b/ui/components/component-library/modal-content/modal-content.tsx
index 202fd55f573a..de294b2abb88 100644
--- a/ui/components/component-library/modal-content/modal-content.tsx
+++ b/ui/components/component-library/modal-content/modal-content.tsx
@@ -1,4 +1,4 @@
-import React, { forwardRef, useRef, useEffect } from 'react';
+import React, { useRef, useEffect } from 'react';
import classnames from 'classnames';
import {
@@ -12,18 +12,24 @@ import {
import { Box, ModalFocus, useModalContext } from '..';
-import { ModalContentProps, ModalContentSize } from './modal-content.types';
+import { BoxProps } from '../box';
+import type { PolymorphicRef } from '../box';
+import {
+ ModalContentProps,
+ ModalContentSize,
+ ModalContentComponent,
+} from './modal-content.types';
-export const ModalContent = forwardRef(
- (
+export const ModalContent: ModalContentComponent = React.forwardRef(
+ (
{
className = '',
children,
size = ModalContentSize.Sm,
modalDialogProps,
...props
- }: ModalContentProps,
- ref: React.Ref,
+ }: ModalContentProps,
+ ref?: PolymorphicRef,
) => {
const {
onClose,
@@ -90,7 +96,7 @@ export const ModalContent = forwardRef(
paddingLeft={4}
paddingTop={[4, 8, 12]}
paddingBottom={[4, 8, 12]}
- {...props}
+ {...(props as BoxProps)}
>
=
+ PolymorphicComponentPropWithRef;
+
+export type ModalContentComponent = (
+ props: ModalContentProps,
+) => React.ReactElement | null;
From 439de24573839aa4b5e56a2075ae3202a3bf294b Mon Sep 17 00:00:00 2001
From: Ramon AC <36987446+racitores@users.noreply.github.com>
Date: Fri, 22 Sep 2023 17:01:58 +0200
Subject: [PATCH 042/137] Feat/add mm e2e mmi build (#20931)
## Explanation
Currently MMI extension is assuming that all general/core MM extension
features should work under MMI but this is not been tested in the
pipeline.
This PR adds Metamask e2e tests run in the circle ci pipeline for a MMI
build generated extension. There are a set failing tests marked as
`@no-mmi` so that when running the tests with `yarn test:e2e:chrome:mmi`
will do `SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mmi` passing
--mmi as param.
This is a first step to improve MMI test coverage and regression. Next
steps will be reviewed and updated tests if required
## Screenshots/Screencaps
### Before
### After
## Manual Testing Steps
## Pre-merge author checklist
- [x] I've clearly explained:
- [x] What problem this PR is solving
- [x] How this problem was solved
- [ ] How reviewers can test my changes
- [ ] Sufficient automated test coverage has been added
## Pre-merge reviewer checklist
- [ ] Manual testing (e.g. pull and build branch, run in browser, test
code being changed)
- [ ] PR is linked to the appropriate GitHub issue
- [ ] **IF** this PR fixes a bug in the release milestone, add this PR
to the release milestone
If further QA is required (e.g. new feature, complex testing steps,
large refactor), add the `Extension QA Board` label.
In this case, a QA Engineer approval will be be required.
---
.circleci/config.yml | 105 ++++++++++++++++++
README.md | 10 ++
package.json | 2 +
test/e2e/metrics/permissions-approved.spec.js | 2 +-
test/e2e/metrics/signature-approved.spec.js | 2 +-
test/e2e/metrics/swaps.spec.js | 2 +-
.../e2e/metrics/transaction-finalized.spec.js | 2 +-
test/e2e/metrics/wallet-created.spec.js | 2 +-
test/e2e/nft/erc1155-interaction.spec.js | 4 +-
test/e2e/nft/erc721-interaction.spec.js | 6 +-
test/e2e/run-all.js | 8 ++
test/e2e/run-e2e-test.js | 12 ++
test/e2e/swaps/swap-eth.spec.js | 2 +-
test/e2e/swaps/swaps-notifications.spec.js | 2 +-
test/e2e/tests/add-account.spec.js | 4 +-
test/e2e/tests/chain-interactions.spec.js | 2 +-
.../tests/custom-token-add-approve.spec.js | 8 +-
test/e2e/tests/edit-gas-fee.spec.js | 4 +-
test/e2e/tests/errors.spec.js | 8 +-
test/e2e/tests/incremental-security.spec.js | 2 +-
test/e2e/tests/portfolio-site.spec.js | 2 +-
test/e2e/tests/send-eth.spec.js | 2 +-
test/e2e/tests/signature-request.spec.js | 2 +-
test/e2e/tests/simple-send.spec.js | 2 +-
test/e2e/tests/terms-of-use.spec.js | 2 +-
25 files changed, 168 insertions(+), 31 deletions(-)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 1755e91b46a1..54656c08828d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -125,6 +125,9 @@ workflows:
- prep-build-test-flask:
requires:
- prep-deps
+ - prep-build-test-mmi:
+ requires:
+ - prep-deps
- prep-build-storybook:
requires:
- prep-deps
@@ -162,6 +165,12 @@ workflows:
- test-e2e-firefox-snaps-flask:
requires:
- prep-build-test-flask
+ - test-e2e-chrome-mmi:
+ requires:
+ - prep-build-test-mmi
+ - test-e2e-chrome-rpc-mmi:
+ requires:
+ - prep-build-test-mmi
- test-e2e-chrome-mv3:
requires:
- prep-build-test-mv3
@@ -248,6 +257,8 @@ workflows:
- test-e2e-firefox-snaps
- test-e2e-chrome-snaps-flask
- test-e2e-firefox-snaps-flask
+ - test-e2e-chrome-mmi
+ - test-e2e-chrome-rpc-mmi
- test-storybook
- benchmark:
requires:
@@ -579,6 +590,27 @@ jobs:
- dist-test-flask
- builds-test-flask
+ prep-build-test-mmi:
+ executor: node-browsers-medium-plus
+ steps:
+ - run: *shallow-git-clone
+ - attach_workspace:
+ at: .
+ - run:
+ name: Build extension for testing
+ command: yarn build:test:mmi
+ - run:
+ name: Move test build to 'dist-test' to avoid conflict with production build
+ command: mv ./dist ./dist-test-mmi
+ - run:
+ name: Move test zips to 'builds-test' to avoid conflict with production build
+ command: mv ./builds ./builds-test-mmi
+ - persist_to_workspace:
+ root: .
+ paths:
+ - dist-test-mmi
+ - builds-test-mmi
+
prep-build-test-mv3:
executor: node-browsers-medium-plus
steps:
@@ -855,6 +887,42 @@ jobs:
- store_test_results:
path: test/test-results/e2e.xml
+ test-e2e-chrome-rpc-mmi:
+ executor: node-browsers
+ steps:
+ - checkout
+ - run:
+ name: Re-Install Chrome
+ command: ./.circleci/scripts/chrome-install.sh
+ - attach_workspace:
+ at: .
+ - run:
+ name: Move test build to dist
+ command: mv ./dist-test-mmi ./dist
+ - run:
+ name: Move test zips to builds
+ command: mv ./builds-test-mmi ./builds
+ - run:
+ name: test:e2e:chrome:rpc
+ command: |
+ if .circleci/scripts/test-run-e2e.sh
+ then
+ yarn test:e2e:chrome:rpc --retries 2 --debug --build-type=mmi
+ fi
+ no_output_timeout: 20m
+ - run:
+ name: Merge JUnit report
+ command: |
+ if [ "$(ls -A test/test-results/e2e)" ]; then
+ yarn test:e2e:report
+ fi
+ when: always
+ - store_artifacts:
+ path: test-artifacts
+ destination: test-artifacts
+ - store_test_results:
+ path: test/test-results/e2e.xml
+
test-e2e-firefox-snaps:
executor: node-browsers
parallelism: 4
@@ -1003,6 +1071,43 @@ jobs:
- store_test_results:
path: test/test-results/e2e.xml
+ test-e2e-chrome-mmi:
+ executor: node-browsers
+ parallelism: 4
+ steps:
+ - run: *shallow-git-clone
+ - run:
+ name: Re-Install Chrome
+ command: ./.circleci/scripts/chrome-install.sh
+ - attach_workspace:
+ at: .
+ - run:
+ name: Move test build to dist
+ command: mv ./dist-test-mmi ./dist
+ - run:
+ name: Move test zips to builds
+ command: mv ./builds-test-mmi ./builds
+ - run:
+ name: test:e2e:chrome:mmi
+ command: |
+ if .circleci/scripts/test-run-e2e.sh
+ then
+ yarn test:e2e:chrome:mmi --retries 2 --debug --build-type=mmi
+ fi
+ no_output_timeout: 20m
+ - run:
+ name: Merge JUnit report
+ command: |
+ if [ "$(ls -A test/test-results/e2e)" ]; then
+ yarn test:e2e:report
+ fi
+ when: always
+ - store_artifacts:
+ path: test-artifacts
+ destination: test-artifacts
+ - store_test_results:
+ path: test/test-results/e2e.xml
+
test-e2e-firefox:
executor: node-browsers-medium-plus
parallelism: 8
diff --git a/README.md b/README.md
index c817f3c570d6..a07efd30327c 100644
--- a/README.md
+++ b/README.md
@@ -102,6 +102,16 @@ Single e2e tests can be run with `yarn test:e2e:single test/e2e/tests/TEST_NAME.
For example, to run the `account-details` tests using Chrome, with debug logging and with the browser set to remain open upon failure, you would use:
`yarn test:e2e:single test/e2e/tests/account-details.spec.js --browser=chrome --debug --leave-running`
+#### Running specific builds types e2e test
+
+Differnt build types have different e2e tests sets. In order to run them look in the `packaje.json` file. You will find:
+```console
+ "test:e2e:chrome:mmi": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mmi",
+ "test:e2e:chrome:snaps": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --snaps",
+ "test:e2e:chrome:mv3": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mv3",
+```
+Note: MMI runs a subset of MetaMask's e2e tests. To facilitate this, we have appended the `@no-mmi` tags to the names of those tests that are not applicable to this build type.
+
### Changing dependencies
Whenever you change dependencies (adding, removing, or updating, either in `package.json` or `yarn.lock`), there are various files that must be kept up-to-date.
diff --git a/package.json b/package.json
index fd03fad33b78..3495c0719a06 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"benchmark:firefox": "SELENIUM_BROWSER=firefox ts-node test/e2e/benchmark.js",
"build:test": "SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build test",
"build:test:flask": "BLOCKAID_FILE_CDN=storage.googleapis.com/ppom-mock-cdn yarn build test --build-type flask",
+ "build:test:mmi": "yarn build test --build-type mmi",
"build:test:mv3": "ENABLE_MV3=true SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build test",
"build:test:dev:mv3": "ENABLE_MV3=true SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build:dev testDev --apply-lavamoat=false",
"test": "yarn lint && yarn test:unit && yarn test:unit:jest",
@@ -36,6 +37,7 @@
"test:unit:global": "mocha test/unit-global/*.test.js",
"test:unit:mocha": "node ./test/run-unit-tests.js --mocha",
"test:e2e:chrome": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js",
+ "test:e2e:chrome:mmi": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mmi",
"test:e2e:chrome:snaps": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --snaps",
"test:e2e:chrome:mv3": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mv3",
"test:e2e:chrome:rpc": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --rpc",
diff --git a/test/e2e/metrics/permissions-approved.spec.js b/test/e2e/metrics/permissions-approved.spec.js
index 1a7b7cc71f70..9bca8354b92c 100644
--- a/test/e2e/metrics/permissions-approved.spec.js
+++ b/test/e2e/metrics/permissions-approved.spec.js
@@ -45,7 +45,7 @@ async function mockSegment(mockServer) {
}
describe('Permissions Approved Event', function () {
- it('Successfully tracked when connecting to dapp', async function () {
+ it('Successfully tracked when connecting to dapp @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/metrics/signature-approved.spec.js b/test/e2e/metrics/signature-approved.spec.js
index 989656832184..cb5a0deb9f0e 100644
--- a/test/e2e/metrics/signature-approved.spec.js
+++ b/test/e2e/metrics/signature-approved.spec.js
@@ -77,7 +77,7 @@ async function clickSignOnSignatureConfirmation(driver) {
await driver.getAllWindowHandles();
}
-describe('Signature Approved Event', function () {
+describe('Signature Approved Event @no-mmi', function () {
it('Successfully tracked for signTypedData_v4', async function () {
await withFixtures(
{
diff --git a/test/e2e/metrics/swaps.spec.js b/test/e2e/metrics/swaps.spec.js
index ba7e7db5270c..1f49b5899737 100644
--- a/test/e2e/metrics/swaps.spec.js
+++ b/test/e2e/metrics/swaps.spec.js
@@ -99,7 +99,7 @@ async function mockSegmentAndMetaswapRequests(mockServer) {
];
}
-describe('Swap Eth for another Token', function () {
+describe('Swap Eth for another Token @no-mmi', function () {
it('Completes a Swap between ETH and DAI after changing initial rate', async function () {
const { initialBalanceInHex } = genRandInitBal();
diff --git a/test/e2e/metrics/transaction-finalized.spec.js b/test/e2e/metrics/transaction-finalized.spec.js
index 1fbfeba0dd55..e24a9bd11fc5 100644
--- a/test/e2e/metrics/transaction-finalized.spec.js
+++ b/test/e2e/metrics/transaction-finalized.spec.js
@@ -134,7 +134,7 @@ const eventHasZeroAddressAnonymousId = (payload) =>
payload.anonymousId === '0x0000000000000000';
describe('Transaction Finalized Event', function () {
- it('Successfully tracked when sending a transaction', async function () {
+ it('Successfully tracked when sending a transaction @no-mmi', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder()
diff --git a/test/e2e/metrics/wallet-created.spec.js b/test/e2e/metrics/wallet-created.spec.js
index c1c573e00e47..17152df356fa 100644
--- a/test/e2e/metrics/wallet-created.spec.js
+++ b/test/e2e/metrics/wallet-created.spec.js
@@ -49,7 +49,7 @@ async function mockSegment(mockServer) {
}
describe('Wallet Created Events', function () {
- it('are sent when onboarding user who chooses to opt in metrics', async function () {
+ it('are sent when onboarding user who chooses to opt in metrics @no-mmi', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder({ onboarding: true })
diff --git a/test/e2e/nft/erc1155-interaction.spec.js b/test/e2e/nft/erc1155-interaction.spec.js
index c6cb2020c78b..948458ef7c8e 100644
--- a/test/e2e/nft/erc1155-interaction.spec.js
+++ b/test/e2e/nft/erc1155-interaction.spec.js
@@ -132,7 +132,7 @@ describe('ERC1155 NFTs testdapp interaction', function () {
);
});
- it('should enable approval for a third party address to manage all ERC1155 token', async function () {
+ it('should enable approval for a third party address to manage all ERC1155 token @no-mmi', async function () {
const expectedMessageTitle =
'Allow access to and transfer all of your NFTs from this collection?';
const expectedDescription =
@@ -222,7 +222,7 @@ describe('ERC1155 NFTs testdapp interaction', function () {
);
});
- it('should revoke approval for a third party address to manage all ERC1155 token', async function () {
+ it('should revoke approval for a third party address to manage all ERC1155 token @no-mmi', async function () {
const expectedMessageTitle =
'Revoke permission to access and transfer all of your NFTs from this collection?';
const expectedDescription =
diff --git a/test/e2e/nft/erc721-interaction.spec.js b/test/e2e/nft/erc721-interaction.spec.js
index bbfd544e76cf..9d169e6ebce2 100644
--- a/test/e2e/nft/erc721-interaction.spec.js
+++ b/test/e2e/nft/erc721-interaction.spec.js
@@ -15,7 +15,7 @@ describe('ERC721 NFTs testdapp interaction', function () {
],
};
- it('should prompt users to add their NFTs to their wallet (one by one)', async function () {
+ it('should prompt users to add their NFTs to their wallet (one by one) @no-mmi', async function () {
await withFixtures(
{
dapp: true,
@@ -359,7 +359,7 @@ describe('ERC721 NFTs testdapp interaction', function () {
);
});
- it('should enable approval for a third party address to manage all ERC721 NFTs', async function () {
+ it('should enable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () {
await withFixtures(
{
dapp: true,
@@ -430,7 +430,7 @@ describe('ERC721 NFTs testdapp interaction', function () {
);
});
- it('should disable approval for a third party address to manage all ERC721 NFTs', async function () {
+ it('should disable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/run-all.js b/test/e2e/run-all.js
index d8094187a018..5065da716d62 100644
--- a/test/e2e/run-all.js
+++ b/test/e2e/run-all.js
@@ -53,6 +53,10 @@ async function main() {
'Run tests in debug mode, logging each driver interaction',
type: 'boolean',
})
+ .option('mmi', {
+ description: `Run only mmi related tests`,
+ type: 'boolean',
+ })
.option('snaps', {
description: `run snaps e2e tests`,
type: 'boolean',
@@ -89,6 +93,7 @@ async function main() {
browser,
debug,
retries,
+ mmi,
snaps,
mv3,
rpc,
@@ -151,6 +156,9 @@ async function main() {
if (updateSnapshot) {
args.push('--update-snapshot');
}
+ if (mmi) {
+ args.push('--mmi');
+ }
// For running E2Es in parallel in CI
const currentChunkIndex = process.env.CIRCLE_NODE_INDEX ?? 0;
diff --git a/test/e2e/run-e2e-test.js b/test/e2e/run-e2e-test.js
index a7b8f8602c8c..ca8ee6966ccd 100644
--- a/test/e2e/run-e2e-test.js
+++ b/test/e2e/run-e2e-test.js
@@ -25,6 +25,10 @@ async function main() {
'Run tests in debug mode, logging each driver interaction',
type: 'boolean',
})
+ .option('mmi', {
+ description: 'Run only mmi related tests',
+ type: 'boolean',
+ })
.option('retries', {
default: 0,
description:
@@ -60,6 +64,7 @@ async function main() {
const {
browser,
debug,
+ mmi,
e2eTestPath,
retries,
retryUntilFailure,
@@ -117,6 +122,13 @@ async function main() {
const configFile = path.join(__dirname, '.mocharc.js');
const extraArgs = process.env.E2E_ARGS?.split(' ') || [];
+ // If mmi flag is passed
+ if (mmi) {
+ // Tests that contains `@no-mmi` will be grep (-g) and inverted (-i)
+ // meaning that all tests with @no-mmi in the title will be ignored
+ extraArgs.push('-g', '@no-mmi', '-i');
+ }
+
const dir = 'test/test-results/e2e';
fs.mkdir(dir, { recursive: true });
diff --git a/test/e2e/swaps/swap-eth.spec.js b/test/e2e/swaps/swap-eth.spec.js
index 380ce2965987..d6693368ed39 100644
--- a/test/e2e/swaps/swap-eth.spec.js
+++ b/test/e2e/swaps/swap-eth.spec.js
@@ -9,7 +9,7 @@ const {
changeExchangeRate,
} = require('./shared');
-describe('Swap Eth for another Token', function () {
+describe('Swap Eth for another Token @no-mmi', function () {
it('Completes second Swaps while first swap is processing', async function () {
withFixturesOptions.ganacheOptions.blockTime = 10;
diff --git a/test/e2e/swaps/swaps-notifications.spec.js b/test/e2e/swaps/swaps-notifications.spec.js
index 2a5a4b9bb25c..4aa0508696af 100644
--- a/test/e2e/swaps/swaps-notifications.spec.js
+++ b/test/e2e/swaps/swaps-notifications.spec.js
@@ -8,7 +8,7 @@ const {
checkNotification,
} = require('./shared');
-describe('Swaps - notifications', function () {
+describe('Swaps - notifications @no-mmi', function () {
async function mockTradesApiPriceSlippageError(mockServer) {
await mockServer
.forGet('https://swap.metaswap.codefi.network/networks/1/trades')
diff --git a/test/e2e/tests/add-account.spec.js b/test/e2e/tests/add-account.spec.js
index 93b0696b33df..b44fbad027d6 100644
--- a/test/e2e/tests/add-account.spec.js
+++ b/test/e2e/tests/add-account.spec.js
@@ -55,7 +55,7 @@ describe('Add account', function () {
);
});
- it('should not affect public address when using secret recovery phrase to recover account with non-zero balance', async function () {
+ it('should not affect public address when using secret recovery phrase to recover account with non-zero balance @no-mmi', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder({ onboarding: true }).build(),
@@ -161,7 +161,7 @@ describe('Add account', function () {
);
});
- it('should be possible to remove an account imported with a private key, but should not be possible to remove an account generated from the SRP imported in onboarding', async function () {
+ it('should be possible to remove an account imported with a private key, but should not be possible to remove an account generated from the SRP imported in onboarding @no-mmi', async function () {
const testPrivateKey =
'14abe6f4aab7f9f626fe981c864d0adeb5685f289ac9270c27b8fd790b4235d6';
diff --git a/test/e2e/tests/chain-interactions.spec.js b/test/e2e/tests/chain-interactions.spec.js
index efb83f35eb34..3ed9be54fdb4 100644
--- a/test/e2e/tests/chain-interactions.spec.js
+++ b/test/e2e/tests/chain-interactions.spec.js
@@ -15,7 +15,7 @@ describe('Chain Interactions', function () {
],
concurrent: { port, chainId },
};
- it('should add the Ganache test chain and not switch the network', async function () {
+ it('should add the Ganache test chain and not switch the network @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/tests/custom-token-add-approve.spec.js b/test/e2e/tests/custom-token-add-approve.spec.js
index f5f58e5d8ebb..03aaecac7b1f 100644
--- a/test/e2e/tests/custom-token-add-approve.spec.js
+++ b/test/e2e/tests/custom-token-add-approve.spec.js
@@ -81,7 +81,7 @@ describe('Create token, approve token and approve token without gas', function (
);
});
- it('approves an already created token and displays the token approval data', async function () {
+ it('approves an already created token and displays the token approval data @no-mmi', async function () {
await withFixtures(
{
dapp: true,
@@ -199,7 +199,7 @@ describe('Create token, approve token and approve token without gas', function (
);
});
- it('set custom spending cap, customizes gas, edit spending cap and checks transaction in transaction list', async function () {
+ it('set custom spending cap, customizes gas, edit spending cap and checks transaction in transaction list @no-mmi', async function () {
await withFixtures(
{
dapp: true,
@@ -341,7 +341,7 @@ describe('Create token, approve token and approve token without gas', function (
);
});
- it('set maximum spending cap, submits the transaction and finds the transaction in the transactions list', async function () {
+ it('set maximum spending cap, submits the transaction and finds the transaction in the transactions list @no-mmi', async function () {
await withFixtures(
{
dapp: true,
@@ -425,7 +425,7 @@ describe('Create token, approve token and approve token without gas', function (
);
});
- it('approves token without gas, set site suggested spending cap, submits the transaction and finds the transaction in the transactions list', async function () {
+ it('approves token without gas, set site suggested spending cap, submits the transaction and finds the transaction in the transactions list @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/tests/edit-gas-fee.spec.js b/test/e2e/tests/edit-gas-fee.spec.js
index 965ffaec7054..38a71361359f 100644
--- a/test/e2e/tests/edit-gas-fee.spec.js
+++ b/test/e2e/tests/edit-gas-fee.spec.js
@@ -8,7 +8,7 @@ const {
const FixtureBuilder = require('../fixture-builder');
describe('Editing Confirm Transaction', function () {
- it('allows selecting high, medium, low gas estimates on edit gas fee popover', async function () {
+ it('allows selecting high, medium, low gas estimates on edit gas fee popover @no-mmi', async function () {
const ganacheOptions = {
hardfork: 'london',
accounts: [
@@ -179,7 +179,7 @@ describe('Editing Confirm Transaction', function () {
);
});
- it('should use dapp suggested estimates for transaction coming from dapp', async function () {
+ it('should use dapp suggested estimates for transaction coming from dapp @no-mmi', async function () {
const ganacheOptions = {
hardfork: 'london',
accounts: [
diff --git a/test/e2e/tests/errors.spec.js b/test/e2e/tests/errors.spec.js
index 9c4927a7838e..245a26cbd925 100644
--- a/test/e2e/tests/errors.spec.js
+++ b/test/e2e/tests/errors.spec.js
@@ -273,7 +273,7 @@ describe('Sentry errors', function () {
});
});
- describe('before initialization, after opting into metrics', function () {
+ describe('before initialization, after opting into metrics @no-mmi', function () {
it('should send error events in background', async function () {
await withFixtures(
{
@@ -589,7 +589,7 @@ describe('Sentry errors', function () {
});
});
- describe('after initialization, after opting into metrics', function () {
+ describe('after initialization, after opting into metrics @no-mmi', function () {
it('should send error events in background', async function () {
await withFixtures(
{
@@ -784,7 +784,7 @@ describe('Sentry errors', function () {
});
});
- it('should have no policy gaps for UI controller state', async function () {
+ it('should have no policy gaps for UI controller state @no-mmi', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
@@ -808,7 +808,7 @@ describe('Sentry errors', function () {
);
});
- it('should not have extra properties in UI state mask', async function () {
+ it('should not have extra properties in UI state mask @no-mmi', async function () {
const expectedMissingState = {
currentPopupId: false, // Initialized as undefined
// Part of transaction controller store, but missing from the initial
diff --git a/test/e2e/tests/incremental-security.spec.js b/test/e2e/tests/incremental-security.spec.js
index e96b49c195e8..961dcc904959 100644
--- a/test/e2e/tests/incremental-security.spec.js
+++ b/test/e2e/tests/incremental-security.spec.js
@@ -17,7 +17,7 @@ describe('Incremental Security', function () {
},
],
};
- it('Back up Secret Recovery Phrase from backup reminder', async function () {
+ it('Back up Secret Recovery Phrase from backup reminder @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/tests/portfolio-site.spec.js b/test/e2e/tests/portfolio-site.spec.js
index 93e0d0877518..b708460e0a13 100644
--- a/test/e2e/tests/portfolio-site.spec.js
+++ b/test/e2e/tests/portfolio-site.spec.js
@@ -12,7 +12,7 @@ describe('Portfolio site', function () {
},
],
};
- it('should link to the portfolio site', async function () {
+ it('should link to the portfolio site @no-mmi', async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/tests/send-eth.spec.js b/test/e2e/tests/send-eth.spec.js
index b0c4838c62ce..320102bc57e1 100644
--- a/test/e2e/tests/send-eth.spec.js
+++ b/test/e2e/tests/send-eth.spec.js
@@ -399,7 +399,7 @@ describe('Send ETH from inside MetaMask to a Multisig Address', function () {
],
};
- it('finds the transaction in the transactions list', async function () {
+ it('finds the transaction in the transactions list @no-mmi', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
diff --git a/test/e2e/tests/signature-request.spec.js b/test/e2e/tests/signature-request.spec.js
index 375f643be807..bbe628d9a831 100644
--- a/test/e2e/tests/signature-request.spec.js
+++ b/test/e2e/tests/signature-request.spec.js
@@ -124,7 +124,7 @@ describe('Sign Typed Data Signature Request', function () {
});
testData.forEach((data) => {
- it(`can queue multiple Signature Requests of ${data.type} and confirm`, async function () {
+ it(`can queue multiple Signature Requests of ${data.type} and confirm @no-mmi`, async function () {
await withFixtures(
{
dapp: true,
diff --git a/test/e2e/tests/simple-send.spec.js b/test/e2e/tests/simple-send.spec.js
index e8c582a2c7c7..3e692ed0e599 100644
--- a/test/e2e/tests/simple-send.spec.js
+++ b/test/e2e/tests/simple-send.spec.js
@@ -7,7 +7,7 @@ const {
const FixtureBuilder = require('../fixture-builder');
describe('Simple send', function () {
- it('can send a simple transaction from one account to another', async function () {
+ it('can send a simple transaction from one account to another @no-mmi', async function () {
const ganacheOptions = {
accounts: [
{
diff --git a/test/e2e/tests/terms-of-use.spec.js b/test/e2e/tests/terms-of-use.spec.js
index f224cb55a251..a8be7b5f1cb1 100644
--- a/test/e2e/tests/terms-of-use.spec.js
+++ b/test/e2e/tests/terms-of-use.spec.js
@@ -12,7 +12,7 @@ describe('Terms of use', function () {
},
],
};
- it('accepts the updated terms of use', async function () {
+ it('accepts the updated terms of use @no-mmi', async function () {
const firstOfJan = 1672574400;
await withFixtures(
{
From d587999929dbd596d7d6447ac8c36c7da7f02920 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Albert=20Oliv=C3=A9?=
Date: Fri, 22 Sep 2023 17:21:04 +0200
Subject: [PATCH 043/137] [MMI] Add Jwt-url-form component unit test (#21005)
## Explanation
Add Jwt-url-form component unit test
## Pre-merge author checklist
- [x] I've clearly explained:
- [x] What problem this PR is solving
- [x] How this problem was solved
- [x] How reviewers can test my changes
- [x] Sufficient automated test coverage has been added
## Pre-merge reviewer checklist
- [x] Manual testing (e.g. pull and build branch, run in browser, test
code being changed)
- [x] **IF** this PR fixes a bug in the release milestone, add this PR
to the release milestone
If further QA is required (e.g. new feature, complex testing steps,
large refactor), add the `Extension QA Board` label.
In this case, a QA Engineer approval will be be required.
---
app/_locales/de/messages.json | 3 -
app/_locales/el/messages.json | 3 -
app/_locales/en/messages.json | 3 -
app/_locales/es/messages.json | 3 -
app/_locales/fr/messages.json | 3 -
app/_locales/hi/messages.json | 3 -
app/_locales/id/messages.json | 3 -
app/_locales/ja/messages.json | 3 -
app/_locales/ko/messages.json | 3 -
app/_locales/pt/messages.json | 3 -
app/_locales/ru/messages.json | 3 -
app/_locales/tl/messages.json | 3 -
app/_locales/tr/messages.json | 3 -
app/_locales/vi/messages.json | 3 -
app/_locales/zh_CN/messages.json | 3 -
.../__snapshots__/jwt-url-form.test.js.snap | 1 +
.../jwt-url-form/jwt-url-form.js | 62 +++++++------------
.../jwt-url-form/jwt-url-form.test.js | 54 +++++++++++++---
18 files changed, 69 insertions(+), 93 deletions(-)
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index e11ed08c5669..e168df836073 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -1600,9 +1600,6 @@
"message": "Dateiimport fehlgeschlagen? Bitte hier klicken!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Die abgelegte Datei ist zu groß."
- },
"flaskWelcomeUninstall": {
"message": "Sie sollten diese Erweiterung deinstallieren.",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index c6ba71ba5f04..601de5052597 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -1600,9 +1600,6 @@
"message": "Η εισαγωγή αρχείων δεν λειτουργεί; Κάντε κλικ εδώ!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Το υποβαλλόμενο αρχείο είναι πολύ μεγάλο."
- },
"flaskWelcomeUninstall": {
"message": "θα πρέπει να απεγκαταστήσετε αυτή την επέκταση",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 342649dbb644..9f31d16f2ab4 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -1628,9 +1628,6 @@
"message": "File import not working? Click here!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "The dropped file is too big."
- },
"flaskWelcomeUninstall": {
"message": "you should uninstall this extension",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index 1289b6ec18f6..8f3def01527a 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -1600,9 +1600,6 @@
"message": "¿No funciona la importación del archivo? Haga clic aquí.",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "El archivo arrastrado es demasiado grande."
- },
"flaskWelcomeUninstall": {
"message": "le recomendamos que desinstale esta extensión",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index b5e898b17e64..e3704bf6508e 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -1600,9 +1600,6 @@
"message": "L’importation de fichier ne fonctionne pas ? Cliquez ici !",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Le fichier déconnecté est trop volumineux."
- },
"flaskWelcomeUninstall": {
"message": "vous devriez désinstaller cette extension",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index 8305de259fb3..101d7c02646a 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -1600,9 +1600,6 @@
"message": "फाइल इम्पोर्ट काम नहीं कर रहा है? यहां क्लिक करें!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "ड्रॉप की गई फाइल बहुत बड़ी है।"
- },
"flaskWelcomeUninstall": {
"message": "आपको इस एक्सटेन्शन को अनइंस्टाल करना चाहिए",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index 092c28c62c9e..fc4fc7531fa8 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -1600,9 +1600,6 @@
"message": "Impor file tidak bekerja? Klik di sini!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "File yang didrop terlalu besar."
- },
"flaskWelcomeUninstall": {
"message": "Anda harus menghapus ekstensi ini",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 7e78096819ad..bb2c6d540be7 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -1600,9 +1600,6 @@
"message": "ファイルのインポートが機能していない場合、ここをクリックしてください!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "ドロップされたファイルが大きすぎます。"
- },
"flaskWelcomeUninstall": {
"message": "この拡張機能はアンインストールしてください",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index 852c9eff84ff..ce14c8c40777 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -1600,9 +1600,6 @@
"message": "파일 가져오기가 작동하지 않나요? 여기를 클릭하세요.",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "드롭한 파일 크기가 너무 큽니다."
- },
"flaskWelcomeUninstall": {
"message": "이 확장 프로그램을 삭제해야 합니다",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index fd60c9ecbf9f..3a20e56b4899 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -1600,9 +1600,6 @@
"message": "A importação de arquivo não está funcionando? Clique aqui!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "O arquivo inserido é grande demais."
- },
"flaskWelcomeUninstall": {
"message": "você deve desinstalar essa extensão",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index 7618ac9e2ed0..9e73a224001a 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -1600,9 +1600,6 @@
"message": "Импорт файлов не работает? Нажмите здесь!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Добавленный файл слишком велик."
- },
"flaskWelcomeUninstall": {
"message": "вам нужно должны удалить это расширение",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index b69e584676af..7160c8b8a0ea 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -1600,9 +1600,6 @@
"message": "Hindi gumagana ang pag-import ng file? Mag-click dito!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Napakalaki ng na-drop na file."
- },
"flaskWelcomeUninstall": {
"message": "dapat mong i-uninstall ang extension na ito",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index adbc419d8435..a896fc4505d0 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -1600,9 +1600,6 @@
"message": "Dosya içe aktarma çalışmıyor mu? Buraya tıklayın!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Bırakılan dosya çok büyük."
- },
"flaskWelcomeUninstall": {
"message": "bu uzantıyı kaldırmalısın",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index 64af5ae9448f..f0c5824066f3 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -1600,9 +1600,6 @@
"message": "Tính năng nhập tập tin không hoạt động? Nhấp vào đây!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "Kích thước tập tin thả vào quá lớn."
- },
"flaskWelcomeUninstall": {
"message": "bạn nên gỡ cài đặt tiện ích mở rộng này",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index a0a2c30ef84a..4e47e7b4e445 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -1600,9 +1600,6 @@
"message": "文件导入失败?点击这里!",
"description": "Helps user import their account from a JSON file"
},
- "fileTooBig": {
- "message": "拖放的文件太大。"
- },
"flaskWelcomeUninstall": {
"message": "您应该卸载此扩展程序",
"description": "This request is shown on the Flask Welcome screen. It is intended for non-developers, and will be bolded."
diff --git a/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap b/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap
index 307dcdd993b1..a78985a04e81 100644
--- a/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap
+++ b/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap
@@ -36,6 +36,7 @@ exports[`JwtUrlForm shows JWT text area when no jwt token exists 1`] = `
class="jwt-url-form__input"
data-testid="jwt-api-url-input"
id="api-url-box"
+ type="text"
value="url"
/>
diff --git a/ui/components/institutional/jwt-url-form/jwt-url-form.js b/ui/components/institutional/jwt-url-form/jwt-url-form.js
index 3b1159f30c89..57d344832ce5 100644
--- a/ui/components/institutional/jwt-url-form/jwt-url-form.js
+++ b/ui/components/institutional/jwt-url-form/jwt-url-form.js
@@ -1,4 +1,4 @@
-import React, { useState, useRef } from 'react';
+import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { useI18nContext } from '../../../hooks/useI18nContext';
import {
@@ -8,20 +8,22 @@ import {
FlexDirection,
TextVariant,
} from '../../../helpers/constants/design-system';
-import { BUTTON_VARIANT, Box, Button, Text } from '../../component-library';
+import { ButtonVariant, Box, Button, Text } from '../../component-library';
import JwtDropdown from '../jwt-dropdown';
const JwtUrlForm = (props) => {
const t = useI18nContext();
- const inputRef = useRef();
const [addNewTokenClicked, setAddNewTokenClicked] = useState(false);
- const [fileTooBigError, setFileTooBigError] = useState();
+ const showJwtDropdown = props.jwtList.length >= 1;
- const renderJWTInput = () => {
- const showAddNewToken = addNewTokenClicked;
- const showJwtDropdown = props.jwtList.length >= 1;
-
- return (
+ return (
+ {
>
{showJwtDropdown && (
{
props.onJwtChange(value);
- setFileTooBigError(false);
}}
/>
)}
- {showJwtDropdown && !showAddNewToken && (
+
+ {showJwtDropdown && !addNewTokenClicked && (
{
{t('or')} {
props.onJwtChange('');
setAddNewTokenClicked(true);
@@ -63,7 +66,7 @@ const JwtUrlForm = (props) => {
)}
- {(!showJwtDropdown || showAddNewToken) && (
+ {(!showJwtDropdown || addNewTokenClicked) && (
{
>
{props.jwtInputText}
- {fileTooBigError && (
-
- {t('fileTooBig')}
-
- )}
+
)}
- );
- };
-
- const renderAPIURLInput = () => {
- return (
{
{
/>
- );
- };
-
- return (
-
- {renderJWTInput()}
- {renderAPIURLInput()}
);
};
JwtUrlForm.propTypes = {
- jwtList: PropTypes.array,
+ jwtList: PropTypes.array.isRequired,
+ onUrlChange: PropTypes.func.isRequired,
+ onJwtChange: PropTypes.func.isRequired,
currentJwt: PropTypes.string,
- onJwtChange: PropTypes.func,
jwtInputText: PropTypes.string,
apiUrl: PropTypes.string,
urlInputText: PropTypes.string,
- onUrlChange: PropTypes.func,
};
export default JwtUrlForm;
diff --git a/ui/components/institutional/jwt-url-form/jwt-url-form.test.js b/ui/components/institutional/jwt-url-form/jwt-url-form.test.js
index 03f783c6f4c0..9d846b3d50c7 100644
--- a/ui/components/institutional/jwt-url-form/jwt-url-form.test.js
+++ b/ui/components/institutional/jwt-url-form/jwt-url-form.test.js
@@ -1,5 +1,4 @@
import React from 'react';
-import sinon from 'sinon';
import { fireEvent, screen } from '@testing-library/react';
import configureMockStore from 'redux-mock-store';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
@@ -19,11 +18,11 @@ describe('JwtUrlForm', function () {
const props = {
jwtList: ['jwt1'],
currentJwt: 'jwt1',
- onJwtChange: sinon.spy(),
+ onJwtChange: jest.fn(),
jwtInputText: 'input text',
apiUrl: 'url',
urlInputText: '',
- onUrlChange: sinon.spy(),
+ onUrlChange: jest.fn(),
};
it('opens JWT Url Form without input for new JWT', () => {
@@ -43,15 +42,21 @@ describe('JwtUrlForm', function () {
expect(screen.getByText('input text')).toBeInTheDocument();
});
- it('goes through the api url input', () => {
- const { queryByTestId } = renderWithProvider(
+ it('calls onUrlChange when API URL input value changes', () => {
+ const { getByTestId } = renderWithProvider(
,
store,
);
- const apiUrlinput = queryByTestId('jwt-api-url-input');
+ const apiUrlinput = getByTestId('jwt-api-url-input');
+
fireEvent.change(apiUrlinput, { target: { value: 'url' } });
- expect(apiUrlinput.value).toBe('url');
+
+ fireEvent.change(apiUrlinput, {
+ target: { value: 'new url' },
+ });
+
+ expect(props.onUrlChange).toHaveBeenCalled();
});
it('shows JWT text area when no jwt token exists', () => {
@@ -68,4 +73,39 @@ describe('JwtUrlForm', function () {
expect(container).toMatchSnapshot();
});
+
+ it('calls onJwtChange when JWT textarea value changes', () => {
+ const customProps = {
+ ...props,
+ currentJwt: '',
+ jwtList: [],
+ };
+
+ const { getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+ fireEvent.change(getByTestId('jwt-input'), { target: { value: 'jwt2' } });
+ expect(props.onJwtChange).toHaveBeenCalled();
+ });
+
+ it('shows JWT dropdown when jwtList has at least one token', () => {
+ const { getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+
+ expect(getByTestId('jwt-dropdown')).toBeInTheDocument();
+ });
+
+ it('calls onJwtChange when JWT dropdown value changes', () => {
+ const { getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+
+ fireEvent.change(getByTestId('jwt-dropdown'), 'jwt2');
+
+ expect(props.onJwtChange).toHaveBeenCalled();
+ });
});
From 5f368d5807738aaa9fe50c259ede2eb2c31c3825 Mon Sep 17 00:00:00 2001
From: Danica Shen
Date: Fri, 22 Sep 2023 17:11:09 +0100
Subject: [PATCH 044/137] fix(20853): improve the logic to handle fetch
(#20977)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## **Description**
Fix: https://github.com/MetaMask/metamask-extension/issues/20853
For sentry error:
https://metamask.sentry.io/issues/3404840685/events/a304e0a6b9784a7780254191cdb0dc59/?project=273505
In UI level, the error should be captured and contribute to a state that
renders the link. Therefore, we do not need extra
UI element to deal with the error. When the error shows up, we want to
capture in the `catch` and set that state again just in case.
## **Manual testing steps**
1. change `{shouldShowNetworkInfo && }` to
`` in `ui/pages/routes/routes.component.js` for
testing purpose
2. Enable auto token detection
3. go to network and block the request starting from `0x`
4. You should see the in the new token information pop up.
## **Screenshots/Recordings**
### **Before**
_[screenshot]_
### **After**
[_[screenshot]_](https://github.com/MetaMask/metamask-extension/assets/12678455/c050e9ad-4918-4656-8625-ade2068fbfa7)
## **Related issues**
_Fixes https://github.com/MetaMask/metamask-extension/issues/20853
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
- [x] What problem this PR is solving.
- [x] How this problem was solved.
- [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [x] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
- [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
---
.../ui/new-network-info/new-network-info.js | 323 +++++++--------
.../new-network-info/new-network-info.test.js | 371 +++++++++++-------
2 files changed, 397 insertions(+), 297 deletions(-)
diff --git a/ui/components/ui/new-network-info/new-network-info.js b/ui/components/ui/new-network-info/new-network-info.js
index e67fad5d2b90..e1da41051d82 100644
--- a/ui/components/ui/new-network-info/new-network-info.js
+++ b/ui/components/ui/new-network-info/new-network-info.js
@@ -1,4 +1,4 @@
-import React, { useContext, useEffect, useState } from 'react';
+import React, { useContext, useEffect, useState, useCallback } from 'react';
import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { I18nContext } from '../../../contexts/i18n';
@@ -9,7 +9,7 @@ import Box from '../box';
import {
AlignItems,
Color,
- DISPLAY,
+ Display,
FontWeight,
TextAlign,
TextVariant,
@@ -33,6 +33,7 @@ const NewNetworkInfo = () => {
const history = useHistory();
const [tokenDetectionSupported, setTokenDetectionSupported] = useState(false);
const [showPopup, setShowPopup] = useState(true);
+ const [isLoading, setIsLoading] = useState(true);
const autoDetectToken = useSelector(getUseTokenDetection);
const primaryTokenImage = useSelector(getNativeCurrencyImage);
const providerConfig = useSelector(getProviderConfig);
@@ -48,189 +49,197 @@ const NewNetworkInfo = () => {
setFirstTimeUsedNetwork(providerConfig.chainId);
};
- const getIsTokenDetectionSupported = async () => {
- const fetchedTokenData = await fetchWithCache({
- url: `${TOKEN_API_METASWAP_CODEFI_URL}${providerConfig.chainId}`,
- functionName: 'getIsTokenDetectionSupported',
- });
-
- return !fetchedTokenData.error;
- };
-
- const checkTokenDetection = async () => {
- const fetchedData = await getIsTokenDetectionSupported();
-
- setTokenDetectionSupported(fetchedData);
- };
+ const checkTokenDetection = useCallback(async () => {
+ try {
+ const fetchedTokenData = await fetchWithCache({
+ url: `${TOKEN_API_METASWAP_CODEFI_URL}${providerConfig.chainId}`,
+ functionName: 'getIsTokenDetectionSupported',
+ });
+ const isTokenDetectionSupported = !fetchedTokenData?.error;
+ setTokenDetectionSupported(isTokenDetectionSupported);
+ setIsLoading(false);
+ } catch {
+ // If there's any error coming from getIsTokenDetectionSupported
+ // we would like to catch this error and simply return false for the state
+ // and this will be handled in UI naturally
+ setTokenDetectionSupported(false);
+ setIsLoading(false);
+ }
+ }, [providerConfig.chainId]);
useEffect(() => {
checkTokenDetection();
- });
-
- if (!showPopup) {
- return null;
- }
+ // we want to only fetch once
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
return (
-
- {t('recoveryPhraseReminderConfirm')}
-
- }
- >
-
- {t('switchedTo')}
-
-
- ) : (
-
- )
+ !isLoading &&
+ showPopup && (
+
+ {t('recoveryPhraseReminderConfirm')}
+
}
- />
-
- {t('thingsToKeep')}
-
-
- {providerConfig.ticker ? (
-
+
-
- •
-
-
- {t('nativeToken', [
-
- {providerConfig.ticker}
- ,
- ])}
-
-
- ) : null}
-
-
- •
-
+ {t('switchedTo')}
+
+
+ ) : (
+
+ )
+ }
+ />
- {t('attemptSendingAssets')}{' '}
-
-
- {t('learnMoreUpperCase')}
-
-
+ {t('thingsToKeep')}
-
- {!autoDetectToken || !tokenDetectionSupported ? (
-
-
- •
-
-
+
+ {providerConfig.ticker ? (
+
+
+ •
+
+
+ {t('nativeToken', [
+
+ {providerConfig.ticker}
+ ,
+ ])}
+
+
+ ) : null}
+
+
+ •
+
- {t('tokenShowUp')}{' '}
-
- {t('clickToManuallyAdd')}
+ {t('learnMoreUpperCase')}
-
+
+ {!autoDetectToken || !tokenDetectionSupported ? (
+
+
+ •
+
+
+
+ {t('tokenShowUp')}{' '}
+
+
+ {t('clickToManuallyAdd')}
+
+
+
+
+
+ ) : null}
- ) : null}
-
-
+
+
+ )
);
};
diff --git a/ui/components/ui/new-network-info/new-network-info.test.js b/ui/components/ui/new-network-info/new-network-info.test.js
index 0f4f52c628a6..b4ca12745115 100644
--- a/ui/components/ui/new-network-info/new-network-info.test.js
+++ b/ui/components/ui/new-network-info/new-network-info.test.js
@@ -1,4 +1,5 @@
import React from 'react';
+import { waitFor } from '@testing-library/react';
import configureMockStore from 'redux-mock-store';
import nock from 'nock';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
@@ -7,171 +8,261 @@ import NewNetworkInfo from './new-network-info';
const fetchWithCache =
require('../../../../shared/lib/fetch-with-cache').default;
-const state = {
- metamask: {
- providerConfig: {
- ticker: 'ETH',
- nickname: '',
- chainId: '0x1',
- type: 'mainnet',
+const localStorageMock = (function () {
+ let store = {};
+ return {
+ getItem(key) {
+ return store[key];
+ },
+
+ setItem(key, value) {
+ store[key] = value.toString();
+ },
+
+ clear() {
+ store = {};
},
- useTokenDetection: false,
- nativeCurrency: 'ETH',
- },
-};
+ removeItem(key) {
+ delete store[key];
+ },
+ };
+})();
+Object.defineProperty(window, 'localStorage', { value: localStorageMock });
+
+const responseOfTokenList = [
+ {
+ address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f',
+ symbol: 'SNX',
+ decimals: 18,
+ name: 'Synthetix Network Token',
+ iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png',
+ aggregators: [
+ 'aave',
+ 'bancor',
+ 'cmc',
+ 'cryptocom',
+ 'coinGecko',
+ 'oneInch',
+ 'paraswap',
+ 'pmm',
+ 'synthetix',
+ 'zapper',
+ 'zerion',
+ 'zeroEx',
+ ],
+ occurrences: 12,
+ },
+ {
+ address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984',
+ symbol: 'UNI',
+ decimals: 18,
+ name: 'Uniswap',
+ iconUrl:
+ 'https://images.prismic.io/token-price-prod/d0352dd9-5de8-4633-839d-bc3422c44d9c_UNI%404x.png',
+ aggregators: [
+ 'aave',
+ 'bancor',
+ 'cmc',
+ 'cryptocom',
+ 'coinGecko',
+ 'oneInch',
+ 'paraswap',
+ 'pmm',
+ 'zapper',
+ 'zerion',
+ 'zeroEx',
+ ],
+ occurrences: 11,
+ },
+];
describe('NewNetworkInfo', () => {
afterEach(() => {
nock.cleanAll();
});
- it('should render title', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x1')
- .reply(
- 200,
- '[{"address":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f","symbol":"SNX","decimals":18,"name":"Synthetix Network Token","iconUrl":"https://assets.coingecko.com/coins/images/3406/large/SNX.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","synthetix","zapper","zerion","zeroEx"],"occurrences":12},{"address":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984","symbol":"UNI","decimals":18,"name":"Uniswap","iconUrl":"https://images.prismic.io/token-price-prod/d0352dd9-5de8-4633-839d-bc3422c44d9c_UNI%404x.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","zapper","zerion","zeroEx"],"occurrences":11}]',
+ describe('fetch token successfully', () => {
+ const state = {
+ metamask: {
+ providerConfig: {
+ ticker: 'ETH',
+ nickname: '',
+ chainId: '0x1',
+ type: 'mainnet',
+ },
+ useTokenDetection: false,
+ nativeCurrency: 'ETH',
+ },
+ };
+
+ it('should match snapshot and render component', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .reply(200, responseOfTokenList);
+
+ const store = configureMockStore()(state);
+ const { getByText, getByTestId } = renderWithProvider(
+ ,
+ store,
);
-
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
- functionName: 'getTokenDetectionSupportStatus',
- });
-
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { getByText } = renderWithProvider(, store);
-
- expect(getByText('You have switched to')).toBeInTheDocument();
- });
-
- it('should render a question mark icon image', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x1')
- .reply(
- 200,
- '[{"address":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f","symbol":"SNX","decimals":18,"name":"Synthetix Network Token","iconUrl":"https://assets.coingecko.com/coins/images/3406/large/SNX.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","synthetix","zapper","zerion","zeroEx"],"occurrences":12},{"address":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984","symbol":"UNI","decimals":18,"name":"Uniswap","iconUrl":"https://images.prismic.io/token-price-prod/d0352dd9-5de8-4633-839d-bc3422c44d9c_UNI%404x.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","zapper","zerion","zeroEx"],"occurrences":11}]',
+ // wait for the fetch to finish
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ // render title
+ expect(getByText('You have switched to')).toBeInTheDocument();
+ // render the network name
+ expect(getByText('Ethereum Mainnet')).toBeInTheDocument();
+ expect(
+ getByTestId('new-network-info__bullet-paragraph').textContent,
+ ).toMatchInlineSnapshot(
+ `"• The native token on this network is ETH. It is the token used for gas fees. "`,
);
-
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
- functionName: 'getTokenDetectionSupportStatus',
});
- state.metamask.nativeCurrency = '';
+ it('should render a question mark icon image for non-main network', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .reply(200, responseOfTokenList);
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { container } = renderWithProvider(, store);
- const questionMark = container.querySelector('.question');
+ const updateTokenDetectionSupportStatus = await fetchWithCache({
+ url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
+ functionName: 'getTokenDetectionSupportStatus',
+ });
- expect(questionMark).toBeDefined();
- });
+ state.metamask.nativeCurrency = '';
- it('should render Ethereum Mainnet caption', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x1')
- .reply(
- 200,
- '[{"address":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f","symbol":"SNX","decimals":18,"name":"Synthetix Network Token","iconUrl":"https://assets.coingecko.com/coins/images/3406/large/SNX.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","synthetix","zapper","zerion","zeroEx"],"occurrences":12},{"address":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984","symbol":"UNI","decimals":18,"name":"Uniswap","iconUrl":"https://images.prismic.io/token-price-prod/d0352dd9-5de8-4633-839d-bc3422c44d9c_UNI%404x.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","zapper","zerion","zeroEx"],"occurrences":11}]',
+ const store = configureMockStore()(
+ state,
+ updateTokenDetectionSupportStatus,
);
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
- functionName: 'getTokenDetectionSupportStatus',
- });
-
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { getByText } = renderWithProvider(, store);
-
- expect(getByText('Ethereum Mainnet')).toBeInTheDocument();
- });
-
- it('should render things to keep in mind text', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x1')
- .reply(
- 200,
- '[{"address":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f","symbol":"SNX","decimals":18,"name":"Synthetix Network Token","iconUrl":"https://assets.coingecko.com/coins/images/3406/large/SNX.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","synthetix","zapper","zerion","zeroEx"],"occurrences":12},{"address":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984","symbol":"UNI","decimals":18,"name":"Uniswap","iconUrl":"https://images.prismic.io/token-price-prod/d0352dd9-5de8-4633-839d-bc3422c44d9c_UNI%404x.png","aggregators":["aave","bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","zapper","zerion","zeroEx"],"occurrences":11}]',
+ const { container, getByTestId } = renderWithProvider(
+ ,
+ store,
);
+ // wait for the fetch to finish
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
- functionName: 'getTokenDetectionSupportStatus',
- });
-
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { getByText } = renderWithProvider(, store);
+ const questionMark = container.querySelector('.question');
- expect(getByText('Things to keep in mind:')).toBeInTheDocument();
- });
-
- it('should render things to keep in mind text when token detection support is not available', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x3')
- .reply(200, '{"error":"ChainId 0x3 is not supported"}');
-
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x3',
- functionName: 'getTokenDetectionSupportStatus',
+ expect(questionMark).toBeDefined();
});
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { getByText } = renderWithProvider(, store);
+ it('should not render first bullet when provider ticker is null', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x3')
+ .reply(200, '{"error":"ChainId 0x3 is not supported"}');
- expect(getByText('Things to keep in mind:')).toBeInTheDocument();
- });
+ state.metamask.providerConfig.ticker = null;
- it('should not render first bullet when provider ticker is null', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x3')
- .reply(200, '{"error":"ChainId 0x3 is not supported"}');
+ const store = configureMockStore()(state);
+ const { container, getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+ // wait for the fetch to finish
+ await new Promise((r) => setTimeout(r, 2000));
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ const firstBox = container.querySelector(
+ 'new-network-info__content-box-1',
+ );
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x3',
- functionName: 'getTokenDetectionSupportStatus',
+ expect(firstBox).toBeNull();
});
- state.metamask.providerConfig.ticker = null;
-
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { container } = renderWithProvider(, store);
- const firstBox = container.querySelector('new-network-info__content-box-1');
-
- expect(firstBox).toBeNull();
- });
-
- it('should render click to manually add link', async () => {
- nock('https://token-api.metaswap.codefi.network')
- .get('/tokens/0x3')
- .reply(200, '{"error":"ChainId 0x3 is not supported"}');
-
- const updateTokenDetectionSupportStatus = await fetchWithCache({
- url: 'https://token-api.metaswap.codefi.network/tokens/0x3',
- functionName: 'getTokenDetectionSupportStatus',
+ describe('add token link', () => {
+ const newState = {
+ metamask: {
+ providerConfig: {
+ ticker: 'ETH',
+ nickname: '',
+ chainId: '0x1',
+ type: 'mainnet',
+ },
+ useTokenDetection: true,
+ nativeCurrency: 'ETH',
+ },
+ };
+
+ it('should not render link when auto token detection is set true and token detection is supported', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .reply(200, responseOfTokenList);
+
+ const store = configureMockStore()(newState);
+ const { getByTestId, queryByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+ // should not render add token link
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ expect(
+ queryByTestId('new-network-info__add-token-manually'),
+ ).toBeNull();
+ });
+
+ it('should render link when auto token detection is set true and token detection is not supported', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .replyWithError('something awful happened');
+
+ const store = configureMockStore()(newState);
+ const { getByTestId } = renderWithProvider(, store);
+ // render add token link when token is supported
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ });
+
+ it('should render link when auto token detection is set false but token detection is not supported', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .reply(403);
+
+ const store = configureMockStore()(state);
+ const { getByTestId } = renderWithProvider(, store);
+ // render add token link when token is supported
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ expect(
+ getByTestId('new-network-info__add-token-manually'),
+ ).toBeInTheDocument();
+ });
+
+ it('should render link when auto token detection is set false and token detection is supported', async () => {
+ nock('https://token-api.metaswap.codefi.network')
+ .get('/tokens/0x1')
+ .reply(200, responseOfTokenList);
+
+ const updateTokenDetectionSupportStatus = await fetchWithCache({
+ url: 'https://token-api.metaswap.codefi.network/tokens/0x1',
+ functionName: 'getTokenDetectionSupportStatus',
+ });
+
+ const store = configureMockStore()(
+ state,
+ updateTokenDetectionSupportStatus,
+ );
+ const { getByText, getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+ // wait for the fetch to finish
+ await waitFor(() => {
+ expect(getByTestId('new-network-info__wrapper')).toBeInTheDocument();
+ });
+ // render add token link when token is supported
+ expect(
+ getByText('Click here to manually add the tokens.'),
+ ).toBeInTheDocument();
+ });
});
-
- const store = configureMockStore()(
- state,
- updateTokenDetectionSupportStatus,
- );
- const { getByText } = renderWithProvider(, store);
-
- expect(getByText('Click here to manually add the tokens.')).toBeDefined();
});
});
From 967ed42aeff8385bf91bdabcb0087ec57b909da7 Mon Sep 17 00:00:00 2001
From: Danica Shen
Date: Fri, 22 Sep 2023 19:11:09 +0100
Subject: [PATCH 045/137] feat(1120): remove toggle all in
incoming-transaction-toggle (#21012)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## **Description**
There was a lag between design and develop that causing an extra feature
developed. This MR is to remove "toggle all" in incoming txn privacy
page
## **Manual testing steps**
1. Go to settings and `Security & privacy` page
2. Navigate to `Show incoming transactions` section
3. There is no toggle all option
## **Screenshots/Recordings**
_If applicable, add screenshots and/or recordings to visualize the
before and after of your change._
### **Before**
### **After**
## **Related issues**
_Fixes
#[1120](https://app.zenhub.com/workspaces/metamask-extension-63529dce65cbb100265a3842/issues/gh/metamask/metamask-planning/1120)
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
- [ ] What problem this PR is solving.
- [ ] How this problem was solved.
- [ ] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [x] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
---
app/_locales/de/messages.json | 3 -
app/_locales/el/messages.json | 3 -
app/_locales/en/messages.json | 3 -
app/_locales/es/messages.json | 3 -
app/_locales/fr/messages.json | 3 -
app/_locales/hi/messages.json | 3 -
app/_locales/id/messages.json | 3 -
app/_locales/ja/messages.json | 3 -
app/_locales/ko/messages.json | 3 -
app/_locales/pt/messages.json | 3 -
app/_locales/ru/messages.json | 3 -
app/_locales/tl/messages.json | 3 -
app/_locales/tr/messages.json | 3 -
app/_locales/vi/messages.json | 3 -
app/_locales/zh_CN/messages.json | 3 -
test/e2e/fixture-builder.js | 2 +-
.../incoming-transaction-toggle.test.js.snap | 57 +------------------
.../incoming-transaction-toggle.test.js | 39 +------------
.../incoming-transaction-toggle.tsx | 49 +---------------
.../network-toggle.tsx | 13 -----
.../privacy-settings/privacy-settings.js | 1 +
.../privacy-settings/privacy-settings.test.js | 4 +-
.../__snapshots__/security-tab.test.js.snap | 57 +------------------
23 files changed, 8 insertions(+), 259 deletions(-)
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index e168df836073..4964eaeb3fec 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Automatische Erkennung aktivieren"
},
- "enableForAllNetworks": {
- "message": "Für alle Netzwerke aktivieren"
- },
"enableFromSettings": {
"message": " In den Einstellungen aktivieren."
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index 601de5052597..e334c1c51ac3 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Ενεργοποίηση αυτόματου εντοπισμού"
},
- "enableForAllNetworks": {
- "message": "Ενεργοποίηση σε όλα τα δίκτυα"
- },
"enableFromSettings": {
"message": "Ενεργοποιήστε το από τις Ρυθμίσεις."
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 9f31d16f2ab4..e55f9ef1ad5e 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -1442,9 +1442,6 @@
"enableAutoDetect": {
"message": " Enable autodetect"
},
- "enableForAllNetworks": {
- "message": "Enable for all networks"
- },
"enableFromSettings": {
"message": " Enable it from Settings."
},
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index 8f3def01527a..ab57ee3f1b55 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Activar autodetección"
},
- "enableForAllNetworks": {
- "message": "Habilitar para todas las redes"
- },
"enableFromSettings": {
"message": " Actívela en Configuración."
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index e3704bf6508e..51f6a9cb9b79 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Activer la détection automatique"
},
- "enableForAllNetworks": {
- "message": "Activer pour tous les réseaux"
- },
"enableFromSettings": {
"message": " Activez-la depuis les Paramètres."
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index 101d7c02646a..8c5d68b36d3f 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " ऑटो डिटेक्ट इनेबल करें"
},
- "enableForAllNetworks": {
- "message": "सभी नेटवर्क पर इनेबल करें"
- },
"enableFromSettings": {
"message": " इसे सेटिंग्स से इनेबल करें।"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index fc4fc7531fa8..d6960805526d 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Aktifkan deteksi otomatis"
},
- "enableForAllNetworks": {
- "message": "Aktifkan untuk semua jaringan"
- },
"enableFromSettings": {
"message": " Aktifkan dari Pengaturan."
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index bb2c6d540be7..5fc44393c931 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " 自動検出を有効にする"
},
- "enableForAllNetworks": {
- "message": "すべてのネットワークで有効にする"
- },
"enableFromSettings": {
"message": " 設定で有効にします。"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index ce14c8c40777..3623959c09ce 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " 자동 감지 활성화"
},
- "enableForAllNetworks": {
- "message": "모든 네트워크에 활성화"
- },
"enableFromSettings": {
"message": " 설정에서 이 기능을 활성화합니다."
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index 3a20e56b4899..041f1de51471 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Ativar detecção automática"
},
- "enableForAllNetworks": {
- "message": "Ativar para todas as redes"
- },
"enableFromSettings": {
"message": " Ative nas Configurações."
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index 9e73a224001a..e5849657a41a 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Включить автоопределение"
},
- "enableForAllNetworks": {
- "message": "Включить для всех сетей"
- },
"enableFromSettings": {
"message": " Включите его в Настройках."
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index 7160c8b8a0ea..8c06dbb8028b 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Paganahin ang autodetect"
},
- "enableForAllNetworks": {
- "message": "Paganahin para sa lahat ng network"
- },
"enableFromSettings": {
"message": " Paganahin ito mula sa Mga Setting."
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index a896fc4505d0..3c3a75e811f5 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Otomatik algılamayı etkinleştir"
},
- "enableForAllNetworks": {
- "message": "Tüm ağlar için etkinleştir"
- },
"enableFromSettings": {
"message": " Ayarlardan etkinleştir."
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index f0c5824066f3..c6eb5d436014 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " Bật tự động phát hiện"
},
- "enableForAllNetworks": {
- "message": "Bật cho tất cả các mạng"
- },
"enableFromSettings": {
"message": " Bật trong Cài Đặt."
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index 4e47e7b4e445..abf90e5e2d49 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -1414,9 +1414,6 @@
"enableAutoDetect": {
"message": " 启用自动检测"
},
- "enableForAllNetworks": {
- "message": "为所有网络启用"
- },
"enableFromSettings": {
"message": " 从设置中启用它。"
},
diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js
index b961a8979799..01db5a279bcd 100644
--- a/test/e2e/fixture-builder.js
+++ b/test/e2e/fixture-builder.js
@@ -383,7 +383,7 @@ function onboardingFixture() {
forgottenPassword: false,
identities: {},
infuraBlocked: false,
- ipfsGateway: 'dweb.link',
+ ipfsGateway: 'dweb.linkssssss',
knownMethodData: {},
ledgerTransportType: 'webhid',
lostIdentities: {},
diff --git a/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
index fafe28db8982..0113330cccdd 100644
--- a/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
+++ b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap
@@ -6,7 +6,7 @@ exports[`IncomingTransactionToggle should render existing incoming transaction p
class="mm-box mm-incoming-transaction-toggle"
>
Show incoming transactions
@@ -15,61 +15,6 @@ exports[`IncomingTransactionToggle should render existing incoming transaction p
>
This relies on different third-party APIs for each network, which expose your Ethereum address and your IP address.
-
@@ -305,61 +305,6 @@ exports[`Security Tab should match snapshot 1`] = `
>
This relies on different third-party APIs for each network, which expose your Ethereum address and your IP address.
-
-
- Enable for all networks
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Off
-
-
- On
-
-
-
-
Date: Fri, 22 Sep 2023 19:55:39 +0100
Subject: [PATCH 046/137] fix: Tweak banner copy (#20981)
---
app/_locales/de/messages.json | 39 ------------
app/_locales/el/messages.json | 39 ------------
app/_locales/en/messages.json | 59 +++++++++----------
app/_locales/es/messages.json | 39 ------------
app/_locales/es_419/messages.json | 6 --
app/_locales/fr/messages.json | 39 ------------
app/_locales/hi/messages.json | 39 ------------
app/_locales/id/messages.json | 39 ------------
app/_locales/ja/messages.json | 39 ------------
app/_locales/ko/messages.json | 39 ------------
app/_locales/pt/messages.json | 39 ------------
app/_locales/pt_BR/messages.json | 6 --
app/_locales/ru/messages.json | 39 ------------
app/_locales/tl/messages.json | 39 ------------
app/_locales/tr/messages.json | 39 ------------
app/_locales/vi/messages.json | 39 ------------
app/_locales/zh_CN/messages.json | 39 ------------
.../index.js | 1 +
.../nfts-detection-notice-import-nfts.js | 27 +++++++++
...ts-detection-notice-import-nfts.stories.js | 10 ++++
.../nfts-detection-notice-nfts-tab/index.js | 1 +
.../nfts-detection-notice-nfts-tab.js} | 8 +--
.../nfts-detection-notice.stories.js | 2 +-
.../app/nfts-detection-notice/index.js | 1 -
ui/components/app/nfts-tab/nfts-tab.js | 20 +++----
ui/components/app/nfts-tab/nfts-tab.test.js | 8 +--
.../import-nfts-modal/import-nfts-modal.js | 57 +++++++++---------
ui/helpers/constants/settings.js | 6 +-
ui/helpers/utils/settings-search.test.js | 6 +-
.../privacy-settings/privacy-settings.js | 11 ++--
.../__snapshots__/security-tab.test.js.snap | 37 ++----------
.../security-tab/security-tab.component.js | 29 ++-------
32 files changed, 134 insertions(+), 707 deletions(-)
create mode 100644 ui/components/app/nfts-detection-notice-import-nfts/index.js
create mode 100644 ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js
create mode 100644 ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.stories.js
create mode 100644 ui/components/app/nfts-detection-notice-nfts-tab/index.js
rename ui/components/app/{nfts-detection-notice/nfts-detection-notice.js => nfts-detection-notice-nfts-tab/nfts-detection-notice-nfts-tab.js} (81%)
rename ui/components/app/{nfts-detection-notice => nfts-detection-notice-nfts-tab}/nfts-detection-notice.stories.js (77%)
delete mode 100644 ui/components/app/nfts-detection-notice/index.js
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index 4964eaeb3fec..d73c4a34c6d4 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "NFT-Medien anzeigen"
},
- "displayNftMediaDescription": {
- "message": "Das Anzeigen von NFT-Medien und Daten gibt legt IP-Adresse OpenSea oder andere Drittanbieter gegenüber offen. Dies kann es Angreifern gestatten, Ihre IP-Adresse mit Ihrer Etherum-Adresse in Verbindung zu bringen. Die automatische NFT-Erkennung benötigt diese Einstellung und wird nicht zur Verfügung stehen, wenn diese deaktiviert ist."
- },
"domain": {
"message": "Domain"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Erweiterte Token-Erkennung ist derzeit über $1 verfügbar. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask zeigt Ihnen ENS-Domains wie „https://metamask.eth“ direkt in der Adressleiste Ihres Browsers an. So funktioniert es:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Normale Browser können in der Regel nicht mit ENS- oder IPFS-Adressen umgehen, aber MetaMask hilft dabei. Bei Verwendung dieser Funktion wird Ihre IP-Adresse eventuell mit IPFS-Diensten von Drittanbietern geteilt."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask findet mithilfe von Ethereums ENS-Contract den mit dem ENS-Namen verbundenen Code."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Wenn der Code mit IPFS verknüpft ist, erhält MetaMask den Content vom IPFS-Netzwerk."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Daraufhin wird dieser, normalerweise eine Webseite oder etwas Ähnliches, angezeigt."
- },
"ensDomainsSettingTitle": {
"message": "ENS-Domains in der Adresszeile anzeigen"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Neuer Contract"
},
- "newNFTDetectedMessage": {
- "message": "Erlauben Sie MetaMask, automatisch NFTs von Opensea zu erkennen und in Ihrer Wallet anzuzeigen."
- },
- "newNFTsDetected": {
- "message": "Neu! NFT-Erkennung"
- },
"newNetworkAdded": {
"message": "„$1“ wurde erfolgreich hinzugefügt!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "NFTs automatisch erkennen"
},
- "useNftDetectionDescription": {
- "message": "Wir verwenden APIs von Drittanbietern, um NFTs in Ihrer Wallet zu erkennen, was bedeutet, dass Ihre IP an zentrale Server weitergegeben werden könnte. Hier müssen einige Dinge beachtet werden, wenn diese Funktion aktiviert wird."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Ihre Konto-Adresse wird für die Drittanbieter-APIs sichtbar sein."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT-Metadaten können Links zu Webseiten mit Betrugs- oder Phishing-Inhalten enthalten."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Jeder kann NFTs via Airdrop in Ihrem Konto ablegen. Dies kann anstößige Inhalte einschließen, die automatisch in Ihrer Wallet angezeigt werden könnten."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Lassen Sie diese Funktion deaktiviert, wenn Sie nicht möchten, dass die App Daten von diesen Diensten bezieht."
- },
"usePhishingDetection": {
"message": "Phishing-Erkennung verwenden"
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index e334c1c51ac3..5d0dec766243 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Εμφάνιση των μέσων NFT"
},
- "displayNftMediaDescription": {
- "message": "Η εμφάνιση των μέσων και δεδομένων NFT εκθέτει τη διεύθυνση IP σας στο OpenSea ή σε άλλους τρίτους. Αυτό μπορεί να επιτρέψει σε εισβολείς να συσχετίσουν τη διεύθυνση IP σας με τη διεύθυνση σας στο Ethereum. Η αυτόματη ανίχνευση των NFT βασίζεται σε αυτή τη ρύθμιση και δεν θα είναι διαθέσιμη όταν αυτή είναι απενεργοποιημένη."
- },
"domain": {
"message": "Τομέας"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Ο βελτιωμένος εντοπισμός για token είναι επί του παρόντος διαθέσιμος στο $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "Το MetaMask σας επιτρέπει να βλέπετε τομείς ENS όπως \"https://metamask.eth\" ακριβώς στη γραμμή διευθύνσεων του προγράμματος περιήγησής σας. Να πώς λειτουργεί:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Τα συνηθισμένα προγράμματα περιήγησης συνήθως δεν χειρίζονται διευθύνσεις ENS ή IPFS, αλλά το MetaMask βοηθάει σε αυτό. Χρησιμοποιώντας αυτή τη λειτουργία ενδέχεται να μοιραστείτε τη διεύθυνση IP σας με υπηρεσίες IPFS τρίτων."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "Το MetaMask ελέγχει το συμβόλαιο ENS του Ethereum για να βρει τον κώδικα που συνδέεται με το όνομα ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Εάν ο κωδικός συνδέεται με το IPFS, λαμβάνει το περιεχόμενο από το δίκτυο IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Στη συνέχεια, μπορείτε να δείτε το περιεχόμενο, συνήθως μια ιστοσελίδα ή κάτι παρόμοιο."
- },
"ensDomainsSettingTitle": {
"message": "Εμφάνιση τομέων ENS στη γραμμή διευθύνσεων"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Νέο συμβόλαιο"
},
- "newNFTDetectedMessage": {
- "message": "Επιτρέψτε στο MetaMask να εντοπίζει αυτόματα τα NFT από το Opensea και να τα εμφανίζει στο πορτοφόλι σας."
- },
- "newNFTsDetected": {
- "message": "Νέο! Εντοπισμός των NFT"
- },
"newNetworkAdded": {
"message": "Το “$1” προστέθηκε με επιτυχία!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Αυτόματη ανίχνευση των NFT"
},
- "useNftDetectionDescription": {
- "message": "Χρησιμοποιούμε API τρίτων για την ανίχνευση NFT στο πορτοφόλι σας, πράγμα που σημαίνει ότι η διεύθυνση IP σας μπορεί να εκτεθεί σε κεντρικούς διακομιστές. Υπάρχουν μερικά πράγματα που πρέπει να προσέχετε κατά την ενεργοποίηση αυτής της λειτουργίας."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Η διεύθυνση του λογαριασμού σας θα είναι ορατή σε API τρίτων."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Τα μεταδεδομένα των NFT ενδέχεται να περιέχουν συνδέσμους προς ιστοσελίδες απάτης ή ηλεκτρονικού «ψαρέματος»."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Οποιοσδήποτε μπορεί να στείλει NFT στον λογαριασμό σας. Αυτό μπορεί να περιλαμβάνει προσβλητικό περιεχόμενο που ενδέχεται να εμφανίζεται αυτόματα στο πορτοφόλι σας."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Αφήστε αυτή τη λειτουργία απενεργοποιημένη αν δεν θέλετε η εφαρμογή να αντλεί δεδομένα από αυτές τις υπηρεσίες."
- },
"usePhishingDetection": {
"message": "Χρήση ανίχνευσης phishing"
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index e55f9ef1ad5e..b29be06eaa27 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -1317,8 +1317,8 @@
"displayNftMedia": {
"message": "Display NFT media"
},
- "displayNftMediaDescription": {
- "message": "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. This can allow attackers to associate your IP address with your Ethereum address. NFT autodetection relies on this setting, and won't be available when this is turned off."
+ "displayNftMediaDesc": {
+ "message": "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off."
},
"domain": {
"message": "Domain"
@@ -1472,20 +1472,17 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Enhanced token detection is currently available on $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask lets you see ENS domains like \"https://metamask.eth\" right in your browser's address bar. Here's how it works:"
+ "ensDomainsSettingDescriptionIntroduction": {
+ "message": "MetaMask lets you see ENS domains right in your browser's address bar. Here's how it works:"
},
- "ensDomainsSettingDescriptionOutro": {
- "message": "Regular browsers don't usually handle ENS or IPFS addresses, but MetaMask helps with that. Using this feature might share your IP address with IPFS third-party services."
+ "ensDomainsSettingDescriptionOutroduction": {
+ "message": "Keep in mind that using this feature exposes your IP address to IPFS third-party services."
},
- "ensDomainsSettingDescriptionPoint1": {
+ "ensDomainsSettingDescriptionPart1": {
"message": "MetaMask checks with Ethereum's ENS contract to find the code connected to the ENS name."
},
- "ensDomainsSettingDescriptionPoint2": {
- "message": "If the code is linked to IPFS, it gets the content from the IPFS network."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Then, you can see the content, usually a website or something similar."
+ "ensDomainsSettingDescriptionPart2": {
+ "message": "If the code links to IPFS, you can see the content associated with it (usually a website)."
},
"ensDomainsSettingTitle": {
"message": "Show ENS domains in address bar"
@@ -2365,8 +2362,8 @@
"mmiBuiltAroundTheWorld": {
"message": "MetaMask Institutional is designed and built around the world."
},
- "mmiNewNFTDetectedMessage": {
- "message": "Allow MetaMask Institutional to automatically detect NFTs from OpenSea and display in your wallet."
+ "mmiNewNFTDetectedInNFTsTabMessage": {
+ "message": "Let MetaMask Institutional automatically detect and display NFTs in your wallet."
},
"more": {
"message": "more"
@@ -2540,11 +2537,18 @@
"newContract": {
"message": "New contract"
},
- "newNFTDetectedMessage": {
- "message": "Allow MetaMask to automatically detect NFTs from Opensea and display in your wallet."
+ "newNFTDetectedInImportNFTsMessage": {
+ "message": "To see your NFT, turn on Display NFT media in $1.",
+ "description": "$1 is used for newNFTDetectedInImportNFTsMessageStrongText"
+ },
+ "newNFTDetectedInImportNFTsMessageStrongText": {
+ "message": "Settings > Security and privacy"
},
- "newNFTsDetected": {
- "message": "New! NFT detection"
+ "newNFTDetectedInNFTsTabMessage": {
+ "message": "Let MetaMask automatically detect and display NFTs in your wallet."
+ },
+ "newNFTsAutodetected": {
+ "message": "NFT autodetection"
},
"newNetworkAdded": {
"message": "“$1” was successfully added!"
@@ -3857,6 +3861,9 @@
"selectAnAction": {
"message": "Select an action"
},
+ "selectDisplayMediaPrivacyPreference": {
+ "message": "Turn on Display NFT media"
+ },
"selectHdPath": {
"message": "Select HD path"
},
@@ -5334,20 +5341,8 @@
"useNftDetection": {
"message": "Autodetect NFTs"
},
- "useNftDetectionDescription": {
- "message": "We use third-party APIs to detect NFTs in your wallet, which means your IP address may be exposed to centralized servers. There are a few things to be cautious about when enabling this feature."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Your account address will be viewable to third-party APIs."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT metadata may contain links to scams or phishing sites."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Anyone can airdrop NFTs to your account. This can include offensive content that might be automatically displayed in your wallet."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Leave this feature off if you don't want the app to pull data from those services."
+ "useNftDetectionDescriptionText": {
+ "message": "Let MetaMask add NFTs you own using third-party services (like OpenSea). Autodetecting NFTs exposes your IP and account address to these services. Enabling this feature could associate your IP address with your Ethereum address and display fake NFTs airdropped by scammers. You can add tokens manually to avoid this risk."
},
"usePhishingDetection": {
"message": "Use phishing detection"
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index ab57ee3f1b55..66e598cb99e9 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Mostrar medios NFT"
},
- "displayNftMediaDescription": {
- "message": "Mostrar los medios y datos NFT expone su dirección IP a OpenSea u otros terceros. Esto puede permitir que los atacantes asocien su dirección IP con su dirección Ethereum. La detección automática de NFT se basa en esta configuración y no estará disponible cuando esté desactivada."
- },
"domain": {
"message": "Dominio"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Actualmente, la detección mejorada de token se encuentra disponible en $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask le permite ver dominios ENS como \"https://metamask.eth\" directamente en la barra de direcciones de su navegador. Así es como funciona:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Los navegadores normales no suelen manejar direcciones ENS o IPFS, pero MetaMask ayuda con esto. El uso de esta función podría compartir su dirección IP con servicios de terceros de IPFS."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask verifica con el contrato ENS de Ethereum para encontrar el código conectado al nombre ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Si el código está vinculado a IPFS, obtiene el contenido de la red IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Después, puede ver el contenido, generalmente un sitio web o algo similar."
- },
"ensDomainsSettingTitle": {
"message": "Mostrar dominios ENS en la barra de direcciones"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Contrato nuevo"
},
- "newNFTDetectedMessage": {
- "message": "Permita que MetaMask detecte de forma automática los NFT de Opensea y los muestre en su monedero."
- },
- "newNFTsDetected": {
- "message": "¡Nuevo! Detección NFT"
- },
"newNetworkAdded": {
"message": "¡\"$1\" se añadió con éxito!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Detección automática de NFT"
},
- "useNftDetectionDescription": {
- "message": "Usamos API de terceros para detectar NFT en su monedero, lo que significa que su dirección IP puede estar expuesta a servidores centralizados. Hay algunas cosas que debe tener cuidado al habilitar esta función."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "La dirección de su cuenta será visible para las API de terceros."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "La metadata de un NFT puede contener enlaces a sitios fraudulentos o de phishing."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Cualquiera puede enviar un NFT no solicitado a su cuenta. Esto puede incluir contenido ofensivo que podría mostrarse automáticamente en su monedero."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Deje esta función desactivada si no desea que la aplicación extraiga datos de esos servicios."
- },
"usePhishingDetection": {
"message": "Usar detección de phishing"
},
diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json
index bb7947555ba0..787544c41b41 100644
--- a/app/_locales/es_419/messages.json
+++ b/app/_locales/es_419/messages.json
@@ -1392,9 +1392,6 @@
"newContract": {
"message": "Contrato nuevo"
},
- "newNFTsDetected": {
- "message": "¡Nuevo! Detección NFT"
- },
"newNetworkAdded": {
"message": "¡\"$1\" se añadió con éxito!"
},
@@ -2662,9 +2659,6 @@
"useNftDetection": {
"message": "Autodetectar NFT"
},
- "useNftDetectionDescription": {
- "message": "La visualización de medios y datos de NFT puede exponer su dirección IP a servidores centralizados. Las API de terceros (como OpenSea) se utilizan para detectar NFT en su cartera. Esto expone la dirección de su cuenta con esos servicios. Deje esta opción desactivada si no quiere que la aplicación extraiga datos de esos servicios."
- },
"usePhishingDetection": {
"message": "Usar detección de phishing"
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index 51f6a9cb9b79..aa812fc86cb8 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Afficher les médias NFT"
},
- "displayNftMediaDescription": {
- "message": "L’affichage des médias et des données NFT expose votre adresse IP à OpenSea ou à d’autres fournisseurs de services tiers. Cela peut permettre à des hackers d’associer votre adresse IP à votre adresse Ethereum. L’autodétection des NFT dépend de ce paramètre et ne sera pas disponible lorsque celui-ci est désactivé."
- },
"domain": {
"message": "Domaine"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "La détection améliorée des jetons est actuellement disponible sur $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask vous permet de voir les domaines ENS comme « https://metamask.eth » dans la barre d’adresse de votre navigateur. Voici comment cela fonctionne :"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Les navigateurs ordinaires ne prennent généralement pas en charge les adresses ENS ou IPFS, mais MetaMask peut y remédier. L’utilisation de cette fonctionnalité peut entraîner le partage de votre adresse IP avec des services tiers IPFS."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask vérifie le contrat ENS d'Ethereum pour trouver le code lié au nom de domaine ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Si le code est lié au protocole IPFS, il obtient le contenu du réseau IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Vous pourrez alors voir le contenu, qui est généralement un site web ou quelque chose de similaire."
- },
"ensDomainsSettingTitle": {
"message": "Afficher les domaines ENS dans la barre d’adresse"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Nouveau contrat"
},
- "newNFTDetectedMessage": {
- "message": "Cela permet à MetaMask de détecter automatiquement les NFT d’OpenSea et de les afficher dans votre portefeuille."
- },
- "newNFTsDetected": {
- "message": "Nouveau ! Détection de NFT"
- },
"newNetworkAdded": {
"message": "« $1 » a été ajouté avec succès !"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Détection automatique des NFT"
},
- "useNftDetectionDescription": {
- "message": "L’affichage des médias et des données des NFT peut exposer votre adresse IP à des serveurs centralisés. Des API tierces (comme OpenSea) sont utilisées pour détecter les NFT dans votre portefeuille. Cela expose donc l’adresse de votre compte à ces services. Désactivez cette option si vous ne souhaitez pas que l’application récupère des données auprès de ces services."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "De plus, veuillez noter que :"
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Les métadonnées des NFT peuvent contenir des liens vers des sites d’arnaques ou d’hameçonnage."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "N’importe qui peut déposer des NFT sur votre compte. Les NFT peuvent contenir du contenu offensant qui pourrait s’afficher automatiquement dans votre portefeuille."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "N’activez pas cette fonctionnalité si vous ne voulez pas que l’application extraie des données de ces services."
- },
"usePhishingDetection": {
"message": "Utiliser la fonction anti-hameçonnage"
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index 8c5d68b36d3f..6b7a2c81650c 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "NFT मीडिया को दिखाएं"
},
- "displayNftMediaDescription": {
- "message": "NFT मीडिया और डेटा दिखाने से आपका IP एड्रेस OpenSea या अन्य थर्ड पार्टियों के सामने आ जाता है। ऐसा होने पर, हमला करने वाले आपके IP एड्रेस को आपके Ethereum एड्रेस के साथ जोड़ पाते हैं। NFT ऑटोडिटेक्शन की सुविधा इस सेटिंग पर निर्भर करती है, और इस सेटिंग को बंद किए जाने पर उपलब्ध नहीं रहेगी।"
- },
"domain": {
"message": "डोमेन"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "एडवांस्ड टोकन डिटेक्शन वर्तमान में $1 पर उपलब्ध है। $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask आपको सीधे आपके ब्राउज़़र के एड्रेस बार में \"https://metamask.eth\" जैसे ENS डोमेन देखने की सुविधा देता है। यह ऐसे काम करता है:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "आमतौर पर इस्तेमाल किए जाने वाले ब्राउज़़र यूं तो ENS या IPFS एड्रेसों को हैंडल नहीं करते हैं, लेकिन MetaMask इसमें मदद करता है। इस फीचर का इस्तेमाल करके आपके IP एड्रेस को IPFS थर्ड-पार्टी सेवाओं के साथ शेयर किया जा सकता है।"
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "ENS नाम से जुड़े कोड को खोजने के लिए MetaMask, Ethereum के ENS कॉन्ट्रैक्ट की जांच करता है।"
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "अगर कोड IPFS से लिंक्ड है, तो उसे IPFS नेटवर्क से कॉन्टेंट प्राप्त होता है।"
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "इसके बाद, आप कॉन्टेंट देख सकते हैं, आमतौर पर एक वेबसाइट या कुछ इसी तरह का।"
- },
"ensDomainsSettingTitle": {
"message": "एड्रेस बार में ENS डोमेन दिखाएँ"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "नया कॉन्ट्रैक्ट"
},
- "newNFTDetectedMessage": {
- "message": "Opensea से ऑटोमेटिक तरीके से NFT का पता लगाने और अपने वॉलेट में दिखाने के लिए MetaMask को अनुमति दें।"
- },
- "newNFTsDetected": {
- "message": "नया! NFT डिटेक्शन"
- },
"newNetworkAdded": {
"message": "\"$1\" सफलतापूर्वक जोड़ा गया था!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "NFT को ऑटो-डिटेक्ट करें"
},
- "useNftDetectionDescription": {
- "message": "आपके वॉलेट में NFT को डिटेक्ट करने के लिए हम थर्ड-पार्टी API का इस्तेमाल करते हैं, जिसका मतलब है आपका IP एड्रेस केंद्रीकृत सर्वर्स को उजागर किया जा सकता है। ये कुछ ऐसी चीजें हैं जिस पर इस फीचर को एनेबल करते समय सतर्क रहना होगा।"
- },
- "useNftDetectionDescriptionLine2": {
- "message": "आपका अकाउंट एड्रेस थर्ड-पार्टी API देख सकते हैं।"
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT मेटाडेटा में धोखाधड़ी या फिशिंग साइटों के लिंक हो सकते हैं।"
- },
- "useNftDetectionDescriptionLine4": {
- "message": "कोई भी आपके अकाउंट में NFT को एयरड्रॉप कर सकता है। इसमें आपत्तिजनक कंटेंट शामिल हो सकती है जो आपके वॉलेट में ऑटोमेटिक तरीके से प्रदर्शित हो सकती है।"
- },
- "useNftDetectionDescriptionLine5": {
- "message": "यदि आप नहीं चाहते कि ऐप उन सेवाओं से डेटा खींचे तो इस सुविधा को बंद कर दें।"
- },
"usePhishingDetection": {
"message": "फिशिंग डिटेक्शन का इस्तेमाल करें"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index d6960805526d..23709960b406 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Tampilkan media NFT"
},
- "displayNftMediaDescription": {
- "message": "Alamat IP Anda dapat diketahui oleh OpenSea atau pihak ketiga lainnya saat Anda menampilkan media dan data NFT. Ini memungkinkan penyerang menghubungkan alamat IP dengan alamat Ethereum Anda. Deteksi otomatis NFT bergantung pada pengaturan ini, dan tidak akan tersedia saat dinonaktifkan."
- },
"domain": {
"message": "Domain"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Saat ini, deteksi token lanjutan tersedia di $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask memungkinkan Anda melihat domain ENS seperti \"https://metamask.eth\" tepat di bilah alamat browser Anda. Berikut cara kerjanya:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Browser biasa umumnya tidak menangani alamat ENS atau IPFS, tetapi MetaMask dapat menanganinya. Alamat IP Anda dapat dibagikan kepada layanan pihak ketiga IPFS saat menggunakan fitur ini."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask memeriksa kontrak ENS Ethereum untuk menemukan kode yang terhubung ke nama ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Jika kode ditautkan ke IPFS, maka kode tersebut mendapatkan konten dari jaringan IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Kemudian, Anda dapat melihat kontennya, umumnya dalam bentuk situs web atau yang serupa."
- },
"ensDomainsSettingTitle": {
"message": "Tampilkan domain ENS di bilah alamat"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Kontrak baru"
},
- "newNFTDetectedMessage": {
- "message": "Izinkan MetaMask mendeteksi NFT dari Opensea secara otomatis dan menampilkannya di dompet Anda."
- },
- "newNFTsDetected": {
- "message": "Baru! Deteksi NFT"
- },
"newNetworkAdded": {
"message": "“$1” berhasil ditambahkan!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Deteksi otomatis NFT"
},
- "useNftDetectionDescription": {
- "message": "Kami menggunakan API pihak ketiga untuk mendeteksi NFT di dompet Anda, yang berarti alamat IP Anda dapat terpapar ke server pusat. Ada beberapa hal yang perlu diwaspadai saat mengaktifkan fitur ini,."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Alamat akun Anda akan dapat dlihat oleh API pihak ketiga."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Metadata NFT dapat berisi tautan ke situs penipuan atau pencurian."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Siapa pun dapat mengirimkan NFT ke akun Anda. Ini mencakup konten ofensif yang dapat ditampilkan secara otomatis di dompet Anda."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Biarkan fitur ini nonaktif jika Anda tidak ingin aplikasi mengambil data dari layanan tersebut."
- },
"usePhishingDetection": {
"message": "Gunakan deteksi phishing"
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 5fc44393c931..0b360e8aca91 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "NFTメディアの表示"
},
- "displayNftMediaDescription": {
- "message": "NFTのメディアとデータを表示した場合、IPアドレスがOpenSeaをはじめとするサードパーティに公開されます。その結果、攻撃者がユーザーのIPアドレスとイーサリアムアドレスを関連付けられるようになる可能性があります。NFTの自動検出はこの設定に依存しており、この設定を無効にすると利用できなくなります。"
- },
"domain": {
"message": "ドメイン"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "改善されたトークン検出は現在$1で利用可能です。$2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMaskは、「https://metamask.eth」などのENSドメインをブラウザのアドレスバーに直接表示します。使い方は次の通りです:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "一般的なブラウザは通常、ENSやIPFSアドレスを扱えませんが、MetaMaskはそれをサポートします。この機能を使うと、IPFSサードパーティサービスにIPアドレスが共有される可能性があります。"
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMaskはイーサリアムのENSコントラクトを確認し、ENS名に接続されたコードを取得します。"
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "コードがIPFSにリンクされている場合、IPFSネットワークからコンテンツを取得します。"
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "その後コンテンツが表示され、通常Webサイトやその他同様のコンテンツとなります。"
- },
"ensDomainsSettingTitle": {
"message": "アドレスバーにENSドメインを表示する"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "新しいコントラクト"
},
- "newNFTDetectedMessage": {
- "message": "OpenseaからのNFTの自動検出とウォレットへの表示をMetaMaskに許可してください。"
- },
- "newNFTsDetected": {
- "message": "新機能!NFT検出"
- },
"newNetworkAdded": {
"message": "「$1」が追加されました!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "NFTを自動検出"
},
- "useNftDetectionDescription": {
- "message": "当社はサードパーティAPIを使用して、ウォレットのNFTを検出します。これにより、ユーザーのIPアドレスが中央サーバーに開示される可能性があります。この機能を有効にする場合は、いくつかの注意点があります。"
- },
- "useNftDetectionDescriptionLine2": {
- "message": "アカウントアドレスがサードパーティAPIに開示されます。"
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFTのメタデータには、詐欺サイトやフィッシングサイトへのリンクが含まれている可能性があります。"
- },
- "useNftDetectionDescriptionLine4": {
- "message": "誰でもユーザーのアカウントにNFTをエアドロップできます。これには不快なコンテンツが含まれていて、ウォレットに自動的に表示される可能性があります。"
- },
- "useNftDetectionDescriptionLine5": {
- "message": "アプリによるこれらのサービスからのデータの取得を希望しない場合は、この機能をオフのままにしてください。"
- },
"usePhishingDetection": {
"message": "フィッシング検出を使用"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index 3623959c09ce..88d52c2f932a 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "NFT 미디어 표시"
},
- "displayNftMediaDescription": {
- "message": "NFT 미디어와 데이터를 표시하면 IP 주소가 OpenSea나 다른 타사에 노출될 수 있습니다. 그러면 이더리움 주소와 연관된 IP 주소가 공격 세력에 의해 이용될 수 있습니다. NFT 자동 감지 기능에는 이 설정이 필요합니다. 이 설정을 비활성화하면 해당 기능도 사용할 수 없습니다."
- },
"domain": {
"message": "도메인"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "$1에서 향상된 토큰 감지 기능을 사용할 수 있습니다. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask를 사용하면 브라우저의 주소창에서 \"https://metamask.eth\"과 같은 ENS 도메인을 바로 볼 수 있습니다. 방법은 다음과 같습니다."
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "일반 브라우저에서는 ENS나 IPFS 주소를 취급하지 않습니다. 하지만 MetaMask에서는 가능합니다. 이 기능을 사용하시면 회원님의 IP 주소를 IPFS 타사 서비스와 공유할 수 있습니다."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask에서는 이더리움의 ENS 계약을 확인하여 해당 ENS 이름과 연결되어 있는 코드를 찾습니다."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "해당 코드가 IPFS와 링크되어 있으면 이를 통해 IPFS 네트워크에서 콘텐츠를 불러올 수 있습니다."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "그러면 보통 웹사이트 또는 이와 유사한 형태의 콘텐츠를 볼 수 있습니다."
- },
"ensDomainsSettingTitle": {
"message": "주소창에 ENS 도메인 표시하기"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "새 계약"
},
- "newNFTDetectedMessage": {
- "message": "MetaMask가 Opensea에서 자동으로 NFT를 감지하고 지갑에 표시할 수 있게 허용하세요."
- },
- "newNFTsDetected": {
- "message": "신규! NFT 감지"
- },
"newNetworkAdded": {
"message": "“$1”(을)를 성공적으로 추가했습니다!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "NFT 자동 감지"
},
- "useNftDetectionDescription": {
- "message": "지갑에서 NFT를 감지하려면 타사 API를 사용해야 합니다. 이렇게 하면 IP 주소가 중앙 서버에 노출될 수 있습니다. 이 기능을 사용하시려면 몇 가지 점을 주의해야 합니다."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "타사 API에서 회원님의 계정 주소를 파악할 수 있습니다."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT 메타 데이터에는 사기나 허위 사이트의 링크가 담겨 있을 수 있습니다."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "누구든지 회원님의 계정으로 NFT를 에어드롭할 수 있습니다. 여기에는 지갑에 자동으로 표시될 수도 있는 공격적인 콘텐츠도 포함될 수 있습니다."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "해당 서비스로부터 데이터를 가져오기를 원치 않으시면 이 기능을 끄세요."
- },
"usePhishingDetection": {
"message": "피싱 감지 사용"
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index 041f1de51471..0fef7b079cd9 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Exibir mídias de NFTs"
},
- "displayNftMediaDescription": {
- "message": "Exibir mídias e dados de NFTs expõe seu endereço IP à OpenSea ou outros terceiros. Isso pode possibilitar que invasores associem seu endereço IP ao seu endereço Ethereum. A detecção automática de NFTs depende dessa configuração e ficará indisponível quando ela estiver desativada."
- },
"domain": {
"message": "Domínio"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "A detecção aprimorada de tokens está disponível no momento em $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "A MetaMask permite que você veja domínios ENS, como \"https://metamask.eth\", direto da barra de endereço do seu navegador. Veja como funciona:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Os navegadores comuns normalmente não lidam com endereços ENS ou IPFS, mas a MetaMask ajuda nisso. Usar esse recurso pode compartilhar seu endereço IP com serviços terceirizados de IPFS."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "A MetaMask verifica com o contrato ENS da Ethereum para encontrar o código conectado ao nome ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Se o código está vinculado ao IPFS, ele recebe o conteúdo da rede IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Então, você poderá ver o conteúdo, geralmente um website ou algo similar."
- },
"ensDomainsSettingTitle": {
"message": "Exibir domínios ENS na barra de endereço"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Novo contrato"
},
- "newNFTDetectedMessage": {
- "message": "Permita que a MetaMask detecte automaticamente os NFTs da OpenSea e mostre-os em sua carteira."
- },
- "newNFTsDetected": {
- "message": "Novidade! Detecção de NFT"
- },
"newNetworkAdded": {
"message": "“$1” foi adicionado com sucesso!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Detectar NFTs automaticamente"
},
- "useNftDetectionDescription": {
- "message": "Usamos APIs terceirizadas para detectar NFTs na sua carteira, ou seja, seu endereço IP pode ser exposto a servidores centralizados. Há algumas coisas para se ter cuidado ao ativar esse recurso."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "O endereço da sua conta estará exposto às APIs terceirizadas."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Os metadados de NFTs podem conter links para golpes ou sites de phishing."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Qualquer pessoa pode realizar o airdrop de NFTs em sua conta. Isso inclui conteúdo ofensivo que pode ser exibido automaticamente em sua carteira."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Deixe desativado esse recurso se não quiser que o app obtenha dados desses serviços."
- },
"usePhishingDetection": {
"message": "Usar detecção de phishing"
},
diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json
index 648dd05bcfa6..91e305e5b3d5 100644
--- a/app/_locales/pt_BR/messages.json
+++ b/app/_locales/pt_BR/messages.json
@@ -1392,9 +1392,6 @@
"newContract": {
"message": "Novo contrato"
},
- "newNFTsDetected": {
- "message": "Novidade! Detecção de NFT"
- },
"newNetworkAdded": {
"message": "“$1” foi adicionado com sucesso!"
},
@@ -2666,9 +2663,6 @@
"useNftDetection": {
"message": "Detectar NFTs automaticamente"
},
- "useNftDetectionDescription": {
- "message": "A exibição de mídias e dados de NFTs pode expor seu endereço IP para servidores centralizados. APIs terceirizadas (como a OpenSea) são utilizadas para detectar NFTs na sua carteira. Isso expõe o endereço da sua conta com esses serviços. Deixe essa opção desativada se você não quer que o aplicativo extraia dados desses serviços."
- },
"usePhishingDetection": {
"message": "Usar detecção de phishing"
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index e5849657a41a..38eded6378ff 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Показать NFT-носитель"
},
- "displayNftMediaDescription": {
- "message": "Отображение носителя и данных NFT раскрывает ваш IP-адрес для OpenSea или других третьих лиц. Это может позволить злоумышленникам связать ваш IP-адрес с вашим адресом Ethereum. Автоопределение NFT зависит от этого параметра и будет недоступно, если он отключен."
- },
"domain": {
"message": "Домен"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Улучшенное определение токенов в настоящее время доступно на $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask позволяет вам видеть домены ENS, такие как https://metamask.eth, прямо в адресной строке вашего браузера. Вот как это работает:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Обычные браузеры обычно не работают с адресами ENS или IPFS, но MetaMask помогает с этим. При использовании этой функции ваш IP-адрес может быть передан сторонним службам IPFS."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask сверяется с контрактом ENS Ethereum, чтобы найти код, связанный с именем ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Если код связан с IPFS, он получает контент из сети IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Затем вы можете увидеть контент, обычно веб-сайт или что-то подобное."
- },
"ensDomainsSettingTitle": {
"message": "Показать домены ENS в адресной строке"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Новый контракт"
},
- "newNFTDetectedMessage": {
- "message": "Разрешите MetaMask автоматически обнаруживать NFT из OpenSea и отображать их в вашем кошельке."
- },
- "newNFTsDetected": {
- "message": "Новинка! Определение NFT"
- },
"newNetworkAdded": {
"message": "«$1» успешно добавлен!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Автоопределение NFT"
},
- "useNftDetectionDescription": {
- "message": "Отображение медиафайлов и данных NFT может раскрыть ваш IP-адрес централизованным серверам. Для обнаружения NFT в вашем кошельке используются сторонние API. При включении этой функции следует соблюдать осторожность."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Адрес вашего счета будет доступен для сторонних API."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Метаданные NFT могут содержать ссылки на мошеннические или фишинговые сайты."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Любой может аирдропнуть NFT на ваш счет. Это может включать оскорбительный контент, который может автоматически отображаться в вашем кошельке."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Не включайте эту функцию, если не хотите, чтобы приложение извлекало данные из этих сервисов."
- },
"usePhishingDetection": {
"message": "Использовать обнаружение фишинга"
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index 8c06dbb8028b..767be00968c8 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Ipakita ang NFT media"
},
- "displayNftMediaDescription": {
- "message": "Ang pagpapakita ng media at data ng NFT ay naglalantad sa iyong IP address sa OpenSea o sa ibang mga third party. Maaari nitong payagan ang mga umaatake na iugnay ang iyong IP address sa iyong Ethereum address. Umaasa ang awtomatikong pagtuklas ng NFT sa setting na ito, at hindi magagamit kapag naka-off ito."
- },
"domain": {
"message": "Domain"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Ang pinahusay na pagtuklas ng token ay kasalukuyang magagamit sa $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "Pinapahintulutan ka ng MetaMask na makita ang mga ENS domain gaya ng \"https://metamask.eth\" mismo sa address bar ng iyong browser. Narito kung paano ito ginagawa:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Ang mga regular na browser ay kadalasang hindi humahawak ng mga ENS o IPFS address, pero ang MetaMask ay tumutulong dito. Ang paggamit sa feature na ito ay maaring magbahagi sa iyong IP address gamit ang mga IPFS third-party na serbisyo."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "Sinusuri ng MetaMask ang kontrata ng ENS ng Ethereum para mahanap ang code na konektado sa pangalan ng ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Kapag ang code ay naka-link sa IPFS, kinukuha nito ang content mula sa IPFS network."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Pagkatapos, makikita mo ang content, na karaniwang website o isang bagay na katulad."
- },
"ensDomainsSettingTitle": {
"message": "Ipinapakita ang mga ENS domain sa address bar"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Bagong kontrata"
},
- "newNFTDetectedMessage": {
- "message": "Payagan ang MetaMask na awtomatikong makita ang mga NFT mula sa Opensea at ipakita sa iyong wallet."
- },
- "newNFTsDetected": {
- "message": "Bago! Pag-detect ng NFT"
- },
"newNetworkAdded": {
"message": "Ang “$1” matagumpay na naidagdag!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Awtomatikong tuklasin ang mga NFT"
},
- "useNftDetectionDescription": {
- "message": "Gumagamit kami ng mga third-party na API upang matukoy ang mga NFT sa iyong wallet, na nangangahulugang ang iyong IP address ay maaaring malantad sa mga sentralisadong server. May ilang bagay na dapat maging maingat kapag pinapagana ang feature na ito."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Ang address ng iyong account ay makikita ng mga third-party na API."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Ang NFT metadata ay maaaring maglaman ng mga link sa mga panloloko o phishing site."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Kahit sino ay maaaring mag-airdrop ng mga NFT sa iyong account. Maaaring kabilang dito ang nakakapanakit na nilalaman na maaaring awtomatikong ipakita sa iyong wallet."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Iwanan ang feature na ito na naka-off kung ayaw mong makuha ng app ang data mula sa mga serbisyong iyon."
- },
"usePhishingDetection": {
"message": "Gumamit ng phishing detection"
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index 3c3a75e811f5..1122cae3602f 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "NFT medyasını göster"
},
- "displayNftMediaDescription": {
- "message": "NFT medyasının ve verilerin gösterilmesi IP adresinizin OpenSea'ye veya diğer üçüncü taraflara aktarılmasına neden olur. Bu durum, saldırganların IP adresinizi Ethereum adresinizle ilişkilendirmesini sağlayabilir. NFT otomatik algılama bu ayara dayalıdır ve bu ayar kapatıldığında kullanılamaz olur."
- },
"domain": {
"message": "Alan"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Gelişmiş token algılama şu anda $1 üzerinden kullanılabilir. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask, \"https://metamask.eth\" gibi ENS alanlarını tarayıcınızın adres çubuğunda görmenizi sağlar. Şöyle çalışır:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Normal tarayıcılar genellikle ENS veya IPFS adreslerini kullanmaz, ancak MetaMask bu konuda yardımcı olur. Bu özelliği kullandığınızda IP adresiniz IPFS üçüncü taraf hizmetleri ile paylaşılabilir."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask, ENS adına bağlı kodu bulmak için Ethereum'un ENS sözleşmesi ile kontrol gerçekleştirir."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Kod IPFS'ye bağlı ise içeriği IPFS ağından alır."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Ardından, genellikle bir web sitesi veya benzeri olan içeriği görebilirsiniz."
- },
"ensDomainsSettingTitle": {
"message": "ENS alanlarını adres çubuğunda göster"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Yeni sözleşme"
},
- "newNFTDetectedMessage": {
- "message": "MetaMask'in Opensea'den NFT'leri otomatik olarak algılamasına ve cüzdanında görüntülemesine izin ver."
- },
- "newNFTsDetected": {
- "message": "Yeni! NFT algılama"
- },
"newNetworkAdded": {
"message": "\"$1\" başarılı bir şekilde eklendi!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "NFT'leri otomatik algıla"
},
- "useNftDetectionDescription": {
- "message": "Cüzdanınızdaki NFT'leri algılamak için üçüncü taraf API'leri kullanırız, yani IP adresinizin merkezi sunuculara açıklanmasına neden olabilir. Bu özelliği etkinleştirirken dikkat edilmesi gereken birkaç konu vardır."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Hesap adresiniz üçüncü taraf API'lerinde görüntülenebilir."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT meta verileri dolandırıcılık veya kimlik avı sitelerine bağlantılar içerebilir."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Hesabınıza herkes NFT airdrop'u gerçekleştirebilir. Cüzdanınızda otomatik olarak gösterilebilen saldırgan içerik de buna dahil olabilir."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Uygulamanın bu hizmetlerden veri çekmesini istemiyorsanız bu özelliği kapalı bırakın."
- },
"usePhishingDetection": {
"message": "Kimlik avı algılama kullan"
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index c6eb5d436014..fc801b890288 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "Hiển thị phương tiện NFT"
},
- "displayNftMediaDescription": {
- "message": "Thao tác hiển thị dữ liệu và phương tiện NFT sẽ hiển thị địa chỉ IP của bạn với OpenSea hoặc các bên thứ ba khác. Điều này có thể cho phép kẻ tấn công liên kết địa chỉ IP với địa chỉ Ethereum của bạn. Tính năng tự động phát hiện NFT dựa trên chế độ cài đặt này và sẽ không khả dụng khi chế độ cài đặt này bị tắt."
- },
"domain": {
"message": "Tên miền"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "Tính năng phát hiện token nâng cao hiện có sẵn trên $1. $2"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask cho phép bạn xem các tên miền ENS như \"https://metamask.eth\" ngay trên thanh địa chỉ của trình duyệt. Sau đây là cách hoạt động:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "Các trình duyệt thông thường thường không xử lý địa chỉ ENS hoặc IPFS, nhưng MetaMask sẽ hỗ trợ xử lý. Việc sử dụng tính năng này có thể chia sẻ địa chỉ IP của bạn với các dịch vụ IPFS bên thứ ba."
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask sẽ kiểm tra hợp đồng ENS của Ethereum để tìm mã được kết nối với tên ENS."
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "Nếu mã được liên kết với IPFS, nó sẽ lấy nội dung từ mạng IPFS."
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "Sau đó, bạn có thể xem nội dung, thường là một trang web hoặc một cái gì đó tương tự."
- },
"ensDomainsSettingTitle": {
"message": "Hiển thị tên miền ENS trong thanh địa chỉ"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "Hợp đồng mới"
},
- "newNFTDetectedMessage": {
- "message": "Cho phép MetaMask tự động phát hiện NFT từ OpenSea và hiển thị trên ví MetaMask của bạn."
- },
- "newNFTsDetected": {
- "message": "Mới! Phát hiện NFT"
- },
"newNetworkAdded": {
"message": "“$1” đã được thêm thành công!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "Tự động phát hiện NFT"
},
- "useNftDetectionDescription": {
- "message": "Chúng tôi sử dụng API của bên thứ ba để phát hiện NFT trong ví của bạn, điều này có thể làm lộ địa chỉ IP của bạn cho các máy chủ tập trung. Có một vài điều cần thận trọng khi kích hoạt tính năng này."
- },
- "useNftDetectionDescriptionLine2": {
- "message": "Các API của bên thứ ba có thể xem được địa chỉ tài khoản của bạn."
- },
- "useNftDetectionDescriptionLine3": {
- "message": "Siêu dữ liệu NFT có thể chứa liên kết dẫn đến các trang web lừa đảo."
- },
- "useNftDetectionDescriptionLine4": {
- "message": "Bất kỳ ai cũng có thể gửi NFT vào tài khoản của bạn. Điều này có thể khiến nội dung xúc phạm tự động hiển thị trong ví của bạn."
- },
- "useNftDetectionDescriptionLine5": {
- "message": "Tắt tính năng này nếu bạn không muốn ứng dụng lấy dữ liệu từ các dịch vụ đó."
- },
"usePhishingDetection": {
"message": "Sử dụng tính năng phát hiện lừa đảo"
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index abf90e5e2d49..c5f4a431970a 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -1289,9 +1289,6 @@
"displayNftMedia": {
"message": "显示NFT媒体"
},
- "displayNftMediaDescription": {
- "message": "显示NFT媒体和数据时,OpenSea或其他第三方会获悉您的IP地址。这可能会使攻击者能够将您的IP地址和您的以太坊地址关联起来。NFT自动检测依赖于此设置,关闭后将不可用。"
- },
"domain": {
"message": "域"
},
@@ -1444,21 +1441,6 @@
"enhancedTokenDetectionAlertMessage": {
"message": "$1. $2目前提供增强型代币检测"
},
- "ensDomainsSettingDescriptionIntro": {
- "message": "MetaMask让您可以直接在浏览器地址栏中看到ENS域(例如“https://metamask.eth”)。其工作原理如下:"
- },
- "ensDomainsSettingDescriptionOutro": {
- "message": "普通浏览器通常不处理ENS或IPFS地址,但MetaMask会帮助解决此问题。使用此功能,您的IP地址可能会与IPFS第三方服务共享。"
- },
- "ensDomainsSettingDescriptionPoint1": {
- "message": "MetaMask会检查以太坊的ENS合约,以查找与ENS名称相关的代码。"
- },
- "ensDomainsSettingDescriptionPoint2": {
- "message": "如果代码链接到IPFS,将会从IPFS网络获取内容。"
- },
- "ensDomainsSettingDescriptionPoint3": {
- "message": "然后,您可以看到内容,通常是网站或类似的内容。"
- },
"ensDomainsSettingTitle": {
"message": "在地址栏中显示ENS域"
},
@@ -2474,12 +2456,6 @@
"newContract": {
"message": "新合约"
},
- "newNFTDetectedMessage": {
- "message": "允许 MetaMask 自动检测 Opensea 的 NFT 并在您的钱包中显示。"
- },
- "newNFTsDetected": {
- "message": "新功能!NFT 检测"
- },
"newNetworkAdded": {
"message": "成功添加了 “$1”!"
},
@@ -5239,21 +5215,6 @@
"useNftDetection": {
"message": "自动检测NFT"
},
- "useNftDetectionDescription": {
- "message": "我们使用第三方API在您的钱包中检测NFT,这意味着您的IP地址可能会暴露给集中式服务器。在启用此功能时,有几件事需要注意。"
- },
- "useNftDetectionDescriptionLine2": {
- "message": "您的账户地址将对第三方API可见。"
- },
- "useNftDetectionDescriptionLine3": {
- "message": "NFT 元数据可能包含欺诈或网络钓鱼网站的链接。"
- },
- "useNftDetectionDescriptionLine4": {
- "message": "任何人都可以将NFT空投到您的账户。这可能包括或会自动显示在钱包中的冒犯性内容。"
- },
- "useNftDetectionDescriptionLine5": {
- "message": "如果您不希望应用程序从这些服务中提取数据,请关闭此功能。"
- },
"usePhishingDetection": {
"message": "使用网络钓鱼检测"
},
diff --git a/ui/components/app/nfts-detection-notice-import-nfts/index.js b/ui/components/app/nfts-detection-notice-import-nfts/index.js
new file mode 100644
index 000000000000..0402860b14f9
--- /dev/null
+++ b/ui/components/app/nfts-detection-notice-import-nfts/index.js
@@ -0,0 +1 @@
+export { default } from './nfts-detection-notice-import-nfts';
diff --git a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js
new file mode 100644
index 000000000000..ab91b80ee397
--- /dev/null
+++ b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js
@@ -0,0 +1,27 @@
+import React from 'react';
+import { useHistory } from 'react-router-dom';
+import { BannerAlert } from '../../component-library';
+import { useI18nContext } from '../../../hooks/useI18nContext';
+import { SECURITY_ROUTE } from '../../../helpers/constants/routes';
+
+export default function NftsDetectionNoticeImportNFTs() {
+ const t = useI18nContext();
+ const history = useHistory();
+
+ return (
+ {
+ e.preventDefault();
+ history.push(`${SECURITY_ROUTE}#opensea-api`);
+ }}
+ >
+ {t('newNFTDetectedInImportNFTsMessage', [
+
+ {t('newNFTDetectedInImportNFTsMessageStrongText')}
+ ,
+ ])}
+
+ );
+}
diff --git a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.stories.js b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.stories.js
new file mode 100644
index 000000000000..e4d21598e837
--- /dev/null
+++ b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.stories.js
@@ -0,0 +1,10 @@
+import React from 'react';
+import NftsDetectionNotice from '.';
+
+export default {
+ title: 'Components/App/NftsDetectionNoticeImportNFTs',
+};
+
+export const DefaultStory = () => ;
+
+DefaultStory.storyName = 'Default';
diff --git a/ui/components/app/nfts-detection-notice-nfts-tab/index.js b/ui/components/app/nfts-detection-notice-nfts-tab/index.js
new file mode 100644
index 000000000000..830226008c90
--- /dev/null
+++ b/ui/components/app/nfts-detection-notice-nfts-tab/index.js
@@ -0,0 +1 @@
+export { default } from './nfts-detection-notice-nfts-tab';
diff --git a/ui/components/app/nfts-detection-notice/nfts-detection-notice.js b/ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice-nfts-tab.js
similarity index 81%
rename from ui/components/app/nfts-detection-notice/nfts-detection-notice.js
rename to ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice-nfts-tab.js
index e7a60c10d969..13ff9c1fb4b2 100644
--- a/ui/components/app/nfts-detection-notice/nfts-detection-notice.js
+++ b/ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice-nfts-tab.js
@@ -4,14 +4,14 @@ import { BannerAlert } from '../../component-library';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { SECURITY_ROUTE } from '../../../helpers/constants/routes';
-export default function NftsDetectionNotice() {
+export default function NFTsDetectionNoticeNFTsTab() {
const t = useI18nContext();
const history = useHistory();
return (
{
e.preventDefault();
@@ -20,12 +20,12 @@ export default function NftsDetectionNotice() {
>
{
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
- t('newNFTDetectedMessage')
+ t('newNFTDetectedInNFTsTabMessage')
///: END:ONLY_INCLUDE_IN
}
{
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
- t('mmiNewNFTDetectedMessage')
+ t('mmiNewNFTDetectedInNFTsTabMessage')
///: END:ONLY_INCLUDE_IN
}
diff --git a/ui/components/app/nfts-detection-notice/nfts-detection-notice.stories.js b/ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice.stories.js
similarity index 77%
rename from ui/components/app/nfts-detection-notice/nfts-detection-notice.stories.js
rename to ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice.stories.js
index 808a6d720ae8..2917d3db9165 100644
--- a/ui/components/app/nfts-detection-notice/nfts-detection-notice.stories.js
+++ b/ui/components/app/nfts-detection-notice-nfts-tab/nfts-detection-notice.stories.js
@@ -2,7 +2,7 @@ import React from 'react';
import NftsDetectionNotice from '.';
export default {
- title: 'Components/App/NftsDetectionNotice',
+ title: 'Components/App/NftsDetectionNoticeNFTsTab',
};
export const DefaultStory = () => ;
diff --git a/ui/components/app/nfts-detection-notice/index.js b/ui/components/app/nfts-detection-notice/index.js
deleted file mode 100644
index 5d4bec37a461..000000000000
--- a/ui/components/app/nfts-detection-notice/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './nfts-detection-notice';
diff --git a/ui/components/app/nfts-tab/nfts-tab.js b/ui/components/app/nfts-tab/nfts-tab.js
index 01b0db363c99..9b4af2f201bd 100644
--- a/ui/components/app/nfts-tab/nfts-tab.js
+++ b/ui/components/app/nfts-tab/nfts-tab.js
@@ -1,29 +1,29 @@
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
-import NftsItems from '../nfts-items';
import {
- JustifyContent,
- FlexDirection,
AlignItems,
- Size,
Display,
+ FlexDirection,
+ JustifyContent,
+ Size,
TextAlign,
- TextVariant,
TextColor,
+ TextVariant,
} from '../../../helpers/constants/design-system';
+import { SECURITY_ROUTE } from '../../../helpers/constants/routes';
+import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
import { useI18nContext } from '../../../hooks/useI18nContext';
+import { useNftsCollections } from '../../../hooks/useNftsCollections';
import { getIsMainnet, getUseNftDetection } from '../../../selectors';
-import { SECURITY_ROUTE } from '../../../helpers/constants/routes';
import {
checkAndUpdateAllNftsOwnershipStatus,
detectNfts,
showImportNftsModal,
} from '../../../store/actions';
-import { useNftsCollections } from '../../../hooks/useNftsCollections';
import { Box, ButtonLink, IconName, Text } from '../../component-library';
-import NftsDetectionNotice from '../nfts-detection-notice';
-import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
+import NFTsDetectionNoticeNFTsTab from '../nfts-detection-notice-nfts-tab/nfts-detection-notice-nfts-tab';
+import NftsItems from '../nfts-items';
export default function NftsTab() {
const useNftDetection = useSelector(getUseNftDetection);
@@ -62,7 +62,7 @@ export default function NftsTab() {
<>
{isMainnet && !useNftDetection ? (
-
+
) : null}
{
selectedAddress: ACCOUNT_2,
nfts: NFTS,
});
- expect(screen.queryByText('New! NFT detection')).toBeInTheDocument();
+ expect(screen.queryByText('NFT autodetection')).toBeInTheDocument();
});
it('should not render the NFTs Detection Notice when currently selected network is Mainnet and currently selected account has NFTs', () => {
render({
selectedAddress: ACCOUNT_1,
nfts: NFTS,
});
- expect(screen.queryByText('New! NFT detection')).not.toBeInTheDocument();
+ expect(screen.queryByText('NFT autodetection')).not.toBeInTheDocument();
});
it('should take user to the experimental settings tab in settings when user clicks "Turn on NFT detection in Settings"', () => {
render({
@@ -227,14 +227,14 @@ describe('NFT Items', () => {
nfts: NFTS,
useNftDetection: true,
});
- expect(screen.queryByText('New! NFT detection')).not.toBeInTheDocument();
+ expect(screen.queryByText('NFT autodetection')).not.toBeInTheDocument();
});
it('should not render the NFTs Detection Notice when currently selected network is Mainnet and currently selected account has no NFTs but user has dismissed the notice before', () => {
render({
selectedAddress: ACCOUNT_1,
nfts: NFTS,
});
- expect(screen.queryByText('New! NFT detection')).not.toBeInTheDocument();
+ expect(screen.queryByText('NFT autodetection')).not.toBeInTheDocument();
});
});
diff --git a/ui/components/multichain/import-nfts-modal/import-nfts-modal.js b/ui/components/multichain/import-nfts-modal/import-nfts-modal.js
index df02ed6c8c79..e6f2d16655d2 100644
--- a/ui/components/multichain/import-nfts-modal/import-nfts-modal.js
+++ b/ui/components/multichain/import-nfts-modal/import-nfts-modal.js
@@ -1,10 +1,15 @@
-import React, { useContext, useState } from 'react';
-import { useHistory } from 'react-router-dom';
-import { useDispatch, useSelector } from 'react-redux';
import { isValidHexAddress } from '@metamask/controller-utils';
import PropTypes from 'prop-types';
-import { useI18nContext } from '../../../hooks/useI18nContext';
-import { DEFAULT_ROUTE } from '../../../helpers/constants/routes';
+import React, { useContext, useState } from 'react';
+import { useDispatch, useSelector } from 'react-redux';
+import { useHistory } from 'react-router-dom';
+import {
+ MetaMetricsEventName,
+ MetaMetricsTokenEventSource,
+} from '../../../../shared/constants/metametrics';
+import { AssetType } from '../../../../shared/constants/transaction';
+import { MetaMetricsContext } from '../../../contexts/metametrics';
+import { getNftsDropdownState } from '../../../ducks/metamask/metamask';
import {
AlignItems,
Display,
@@ -14,43 +19,37 @@ import {
Severity,
Size,
} from '../../../helpers/constants/design-system';
-
-import {
- addNftVerifyOwnership,
- getTokenStandardAndDetails,
- ignoreTokens,
- setNewNftAddedMessage,
- updateNftDropDownState,
-} from '../../../store/actions';
+import { DEFAULT_ROUTE } from '../../../helpers/constants/routes';
+import { useI18nContext } from '../../../hooks/useI18nContext';
import {
getCurrentChainId,
getIsMainnet,
getSelectedAddress,
getUseNftDetection,
} from '../../../selectors';
-import { getNftsDropdownState } from '../../../ducks/metamask/metamask';
-import NftsDetectionNotice from '../../app/nfts-detection-notice';
-import { MetaMetricsContext } from '../../../contexts/metametrics';
-import { AssetType } from '../../../../shared/constants/transaction';
import {
- MetaMetricsEventName,
- MetaMetricsTokenEventSource,
-} from '../../../../shared/constants/metametrics';
+ addNftVerifyOwnership,
+ getTokenStandardAndDetails,
+ ignoreTokens,
+ setNewNftAddedMessage,
+ updateNftDropDownState,
+} from '../../../store/actions';
+import NftsDetectionNoticeImportNFTs from '../../app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts';
import {
- IconName,
- ModalContent,
- ModalOverlay,
- ModalHeader,
- Modal,
+ BannerAlert,
+ Box,
ButtonPrimary,
ButtonSecondary,
ButtonSecondarySize,
- Box,
FormTextField,
- Label,
Icon,
+ IconName,
IconSize,
- BannerAlert,
+ Label,
+ Modal,
+ ModalContent,
+ ModalHeader,
+ ModalOverlay,
} from '../../component-library';
import Tooltip from '../../ui/tooltip';
@@ -159,7 +158,7 @@ export const ImportNftsModal = ({ onClose }) => {
{isMainnet && !useNftDetection ? (
-
+
) : null}
{nftAddFailed && (
diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js
index 4a879d614e7b..108292274a85 100644
--- a/ui/helpers/constants/settings.js
+++ b/ui/helpers/constants/settings.js
@@ -216,21 +216,21 @@ export const SETTINGS_CONSTANTS = [
{
tabMessage: (t) => t('securityAndPrivacy'),
sectionMessage: (t) => t('ensDomainsSettingTitle'),
- descriptionMessage: (t) => t('ensDomainsSettingDescriptionIntro'),
+ descriptionMessage: (t) => t('ensDomainsSettingDescriptionIntroduction'),
route: `${SECURITY_ROUTE}#ens-domains`,
icon: 'fa fa-lock',
},
{
tabMessage: (t) => t('securityAndPrivacy'),
sectionMessage: (t) => t('displayNftMedia'),
- descriptionMessage: (t) => t('displayNftMediaDescription'),
+ descriptionMessage: (t) => t('displayNftMediaDesc'),
route: `${SECURITY_ROUTE}#opensea-api`,
icon: 'fa fa-lock',
},
{
tabMessage: (t) => t('securityAndPrivacy'),
sectionMessage: (t) => t('useNftDetection'),
- descriptionMessage: (t) => t('useNftDetectionDescription'),
+ descriptionMessage: (t) => t('useNftDetectionDescriptionText'),
route: `${SECURITY_ROUTE}#autodetect-nfts`,
icon: 'fa fa-lock',
},
diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js
index 41928138e239..59f15f018edc 100644
--- a/ui/helpers/utils/settings-search.test.js
+++ b/ui/helpers/utils/settings-search.test.js
@@ -103,11 +103,11 @@ const t = (key) => {
return 'We use third-party APIs to detect and display new tokens sent to your wallet. Turn off if you don’t want the app to pull data from those services.';
case 'displayNftMedia':
return 'Display NFT media';
- case 'displayNftMediaDescription':
- return "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. This can allow attackers to associate your IP address with your Ethereum address. NFT autodetection relies on this setting, and won't be available when this is turned off.";
+ case 'displayNftMediaDesc':
+ return "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off.";
case 'useNftDetection':
return 'Autodetect NFTs';
- case 'useNftDetectionDescription':
+ case 'useNftDetectionDescriptionText':
return 'Displaying NFTs media & data may expose your IP address to centralized servers. Third-party APIs (like OpenSea) are used to detect NFTs in your wallet. This exposes your account address with those services. Leave this disabled if you don’t want the app to pull data from those those services.';
case 'about':
return 'About';
diff --git a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js
index c032e7fdbb25..469d80e4d771 100644
--- a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js
+++ b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js
@@ -270,7 +270,7 @@ export default function PrivacySettings() {
description={
<>
- {t('ensDomainsSettingDescriptionIntro')}
+ {t('ensDomainsSettingDescriptionIntroduction')}
- {t('ensDomainsSettingDescriptionPoint1')}
+ {t('ensDomainsSettingDescriptionPart1')}
- {t('ensDomainsSettingDescriptionPoint2')}
-
-
- {t('ensDomainsSettingDescriptionPoint3')}
+ {t('ensDomainsSettingDescriptionPart2')}
- {t('ensDomainsSettingDescriptionOutro')}
+ {t('ensDomainsSettingDescriptionOutroduction')}
>
}
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 bd66c87045f1..147715ddbc68 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
@@ -866,7 +866,7 @@ exports[`Security Tab should match snapshot 1`] = `
- MetaMask lets you see ENS domains like "https://metamask.eth" right in your browser's address bar. Here's how it works:
+ MetaMask lets you see ENS domains right in your browser's address bar. Here's how it works:
- If the code is linked to IPFS, it gets the content from the IPFS network.
-
-
- Then, you can see the content, usually a website or something similar.
+ If the code links to IPFS, you can see the content associated with it (usually a website).
- Regular browsers don't usually handle ENS or IPFS addresses, but MetaMask helps with that. Using this feature might share your IP address with IPFS third-party services.
+ Keep in mind that using this feature exposes your IP address to IPFS third-party services.
@@ -1114,7 +1109,7 @@ exports[`Security Tab should match snapshot 1`] = `
- Displaying NFT media and data exposes your IP address to OpenSea or other third parties. This can allow attackers to associate your IP address with your Ethereum address. NFT autodetection relies on this setting, and won't be available when this is turned off.
+ Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off.
-
- We use third-party APIs to detect NFTs in your wallet, which means your IP address may be exposed to centralized servers. There are a few things to be cautious about when enabling this feature.
-
-
-
- Your account address will be viewable to third-party APIs.
-
-
- NFT metadata may contain links to scams or phishing sites.
-
-
- Anyone can airdrop NFTs to your account. This can include offensive content that might be automatically displayed in your wallet.
-
-
-
- Leave this feature off if you don't want the app to pull data from those services.
-
+ Let MetaMask add NFTs you own using third-party services (like OpenSea). Autodetecting NFTs exposes your IP and account address to these services. Enabling this feature could associate your IP address with your Ethereum address and display fake NFTs airdropped by scammers. You can add tokens manually to avoid this risk.
From b30b3295295248d926efb522e09eaa33615edcc1 Mon Sep 17 00:00:00 2001
From: David Walsh
Date: Fri, 22 Sep 2023 14:09:29 -0500
Subject: [PATCH 047/137] UX: Load the extension HTML pages and background with
async JavaScript (#20843)
## Explanation
At present the loading of both the fullscreen view and MetaMask popup
are really slow due to the loading of ~15-20 synchronous JavaScript
files in `home.html`, `popup.html`, and `notification.html`. Our users
experience this slowness most notably when clicking on the MetaMask icon
in the extensions toolbar -- the click happens, then nothing for
seemingly 1-2 seconds, and then the popup finally renders the user's
wallet.
This PR loads both the UI and background scripts (1) sequentially and
(2) asynchronously, drastically improving perceived performance. Now
when clicking the MetaMask extension icon, the popup displays
*immediately*, shows a spinner while the scripts load, and then load in
the UI.
## Screenshots/Screencaps
https://github.com/MetaMask/metamask-extension/assets/46655/23a83957-f4f4-45aa-a0db-9108867f84da
## Manual Testing Steps
1. Pull down this PR
2. `yarn start`
3. Click the MetaMask logo in the extension toolbar
4. See the popup display *very quickly*, showing the MetaMask head and
spinner, and roughly 1 second later the extension displays and functions
as normal
5. Open the fullscreen view, see it load and work as normal
## Pre-merge author checklist
- [ ] I've clearly explained:
- [ ] What problem this PR is solving
- [ ] How this problem was solved
- [ ] How reviewers can test my changes
- [ ] Sufficient automated test coverage has been added
## Pre-merge reviewer checklist
- [ ] Manual testing (e.g. pull and build branch, run in browser, test
code being changed)
- [ ] PR is linked to the appropriate GitHub issue
- [ ] **IF** this PR fixes a bug in the release milestone, add this PR
to the release milestone
If further QA is required (e.g. new feature, complex testing steps,
large refactor), add the `Extension QA Board` label.
In this case, a QA Engineer approval will be be required.
---
app/background.html | 18 +--------
app/home.html | 18 +--------
app/notification.html | 18 +--------
app/popup.html | 18 +--------
app/scripts/load-app.js | 28 ++++++++++++++
development/build/scripts.js | 72 +++++++++++++++++++++++++++++-------
development/build/static.js | 4 ++
test/e2e/webdriver/driver.js | 8 +++-
8 files changed, 101 insertions(+), 83 deletions(-)
create mode 100644 app/scripts/load-app.js
diff --git a/app/background.html b/app/background.html
index eabb3bf3a704..beed01def0ce 100644
--- a/app/background.html
+++ b/app/background.html
@@ -4,23 +4,7 @@
-
-
-
-
- {{@if(it.applyLavaMoat)}}
-
-
-
- {{#else}}
-
-
-
-
- {{/if}}
- {{@each(it.jsBundles) => val}}
-
- {{/each}}
+