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/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/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/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 08d2838bf391..c02f711a04c5 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -860,6 +860,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..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",
@@ -245,7 +247,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/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/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/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/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(
{
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 ? (
+
+ ) : (
+
+ )}
+ >
+ );
+ },
+ );
+ })
) : (
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/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] });
};
-
+
}
- />
-
- {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();
});
});
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
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',
diff --git a/yarn.lock b/yarn.lock
index 4d894f59bdf0..7c407e6c4bb8 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"