toggleAccountMenu()} />
+ ) : null}
{isLoading ? : null}
{!isLoading && isNetworkLoading ? : null}
diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js
index baa22c162504..c132bcfa87c7 100644
--- a/ui/pages/routes/routes.container.js
+++ b/ui/pages/routes/routes.container.js
@@ -18,6 +18,7 @@ import {
setCurrentCurrency,
setLastActiveTime,
setMouseUserState,
+ toggleAccountMenu,
} from '../../store/actions';
import { pageChanged } from '../../ducks/history/history';
import { prepareToLeaveSwaps } from '../../ducks/swaps/swaps';
@@ -55,6 +56,7 @@ function mapStateToProps(state) {
forgottenPassword: state.metamask.forgottenPassword,
isCurrentProviderCustom: isCurrentProviderCustom(state),
completedOnboarding,
+ isAccountMenuOpen: state.metamask.isAccountMenuOpen,
};
}
@@ -67,6 +69,7 @@ function mapDispatchToProps(dispatch) {
setLastActiveTime: () => dispatch(setLastActiveTime()),
pageChanged: (path) => dispatch(pageChanged(path)),
prepareToLeaveSwaps: () => dispatch(prepareToLeaveSwaps()),
+ toggleAccountMenu: () => dispatch(toggleAccountMenu()),
};
}
diff --git a/ui/selectors/permissions.js b/ui/selectors/permissions.js
index 27f5c4c88f6a..d4b3d90de780 100644
--- a/ui/selectors/permissions.js
+++ b/ui/selectors/permissions.js
@@ -100,6 +100,24 @@ export function getConnectedSubjectsForSelectedAddress(state) {
return connectedSubjects;
}
+export function getConnectedSubjectsForAllAddresses(state) {
+ const subjects = getPermissionSubjects(state);
+ const subjectMetadata = getSubjectMetadata(state);
+
+ const accountsToConnections = {};
+ Object.entries(subjects).forEach(([subjectKey, subjectValue]) => {
+ const exposedAccounts = getAccountsFromSubject(subjectValue);
+ exposedAccounts.forEach((address) => {
+ if (!accountsToConnections[address]) {
+ accountsToConnections[address] = [];
+ }
+ accountsToConnections[address].push(subjectMetadata[subjectKey] || {});
+ });
+ });
+
+ return accountsToConnections;
+}
+
export function getSubjectsWithPermission(state, permissionName) {
const subjects = getPermissionSubjects(state);
diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js
index 4fc7ba94870d..dea043e15076 100644
--- a/ui/selectors/selectors.js
+++ b/ui/selectors/selectors.js
@@ -1363,9 +1363,3 @@ export function getIsDesktopEnabled(state) {
return state.metamask.desktopEnabled;
}
///: END:ONLY_INCLUDE_IN
-
-export function getHasTheOpenSeaTransactionSecurityProviderPopoverBeenShown(
- state,
-) {
- return state.metamask.openSeaTransactionSecurityProviderPopoverHasBeenShown;
-}
diff --git a/ui/store/actions.ts b/ui/store/actions.ts
index a71cdb62e63c..913e7de0dd70 100644
--- a/ui/store/actions.ts
+++ b/ui/store/actions.ts
@@ -4575,12 +4575,11 @@ export function hideBetaHeader() {
export function setTransactionSecurityCheckEnabled(
transactionSecurityCheckEnabled: boolean,
): ThunkAction {
- return async (dispatch) => {
+ return async () => {
try {
await submitRequestToBackground('setTransactionSecurityCheckEnabled', [
transactionSecurityCheckEnabled,
]);
- await forceUpdateMetamaskState(dispatch);
} catch (error) {
logErrorWithMessage(error);
}
@@ -4591,19 +4590,6 @@ export function setFirstTimeUsedNetwork(chainId: string) {
return submitRequestToBackground('setFirstTimeUsedNetwork', [chainId]);
}
-export function setOpenSeaTransactionSecurityProviderPopoverHasBeenShown(): ThunkAction<
- void,
- MetaMaskReduxState,
- unknown,
- AnyAction
-> {
- return async () => {
- await submitRequestToBackground(
- 'setOpenSeaTransactionSecurityProviderPopoverHasBeenShown',
- );
- };
-}
-
// QR Hardware Wallets
export async function submitQRHardwareCryptoHDKey(cbor: Hex) {
await submitRequestToBackground('submitQRHardwareCryptoHDKey', [cbor]);
diff --git a/yarn.lock b/yarn.lock
index 3f1224f76bcc..6ea77ae8ff53 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3704,10 +3704,10 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/contract-metadata@npm:^2.1.0, @metamask/contract-metadata@npm:^2.2.0":
- version: 2.2.0
- resolution: "@metamask/contract-metadata@npm:2.2.0"
- checksum: 31b94274c7c0a2d03377f3fa5e46574cde6607fd3a3b571cb7ffa4f7ce6dc90e2bfe2a4b2eb9eb4ebcd07cb7d6918da893356b699e91bc6e005b472ca7279370
+"@metamask/contract-metadata@npm:^2.1.0, @metamask/contract-metadata@npm:^2.3.1":
+ version: 2.3.1
+ resolution: "@metamask/contract-metadata@npm:2.3.1"
+ checksum: 95dcc27f661a3e380c0cca8c6d90fb1777e31ab3fe16909fd5c67844125510e3f8e9eca05c9069fde34c77df3b66e56111c7a908a07623e88052ef147eff4315
languageName: node
linkType: hard
@@ -3849,35 +3849,43 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/eth-json-rpc-infura@npm:^7.0.0":
- version: 7.0.0
- resolution: "@metamask/eth-json-rpc-infura@npm:7.0.0"
+"@metamask/eth-json-rpc-infura@npm:^8.0.0":
+ version: 8.0.0
+ resolution: "@metamask/eth-json-rpc-infura@npm:8.0.0"
dependencies:
"@metamask/utils": ^3.0.1
- eth-json-rpc-middleware: ^8.1.0
+ eth-json-rpc-middleware: ^9.0.0
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
node-fetch: ^2.6.7
- checksum: 6230cb289b66db39d27f08ffc72cfb79274e632e4e14eb52ca72d19167d17bbf22c58718d80f801818058631dec0638bcc21ef4b229fa8d53e7f9328be870fc6
+ checksum: e8c3a4b75d4f2bb09f68d7d2ac6b992f264df893921b50a05c35968ee684b7bba90180870eebecfc89b7fbf40d11de2a545ab68f1d511f569ce0a6519c64b0aa
languageName: node
linkType: hard
-"@metamask/eth-json-rpc-middleware@npm:^10.0.0":
- version: 10.0.0
- resolution: "@metamask/eth-json-rpc-middleware@npm:10.0.0"
+"@metamask/eth-json-rpc-middleware@npm:^11.0.0":
+ version: 11.0.0
+ resolution: "@metamask/eth-json-rpc-middleware@npm:11.0.0"
dependencies:
+ "@metamask/eth-json-rpc-provider": ^1.0.0
"@metamask/eth-sig-util": ^5.0.0
- "@metamask/safe-event-emitter": ^2.0.0
"@metamask/utils": ^3.0.3
- btoa: ^1.2.1
clone: ^2.1.1
- eth-block-tracker: ^5.0.1
+ eth-block-tracker: ^7.0.0
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
- json-stable-stringify: ^1.0.1
- node-fetch: ^2.6.7
pify: ^3.0.0
- checksum: c754b3a39f175698070b4d07076e692d3080738bd25157c3b93114d286c975ee6895d5793b4188ca3d0abbcdef04bfde9e2d4835251a6b725b002d3750bf98de
+ safe-stable-stringify: ^2.3.2
+ checksum: c866d07a199ab480ceeb7ab8df61c08284640b5ac13aee3dd81dae9e0e5575f4a425d95728070ab5402c0c6cd5f9237fb5f4f22dbcdc99fe0b50bb47df561830
+ languageName: node
+ linkType: hard
+
+"@metamask/eth-json-rpc-provider@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "@metamask/eth-json-rpc-provider@npm:1.0.0"
+ dependencies:
+ "@metamask/safe-event-emitter": ^2.0.0
+ json-rpc-engine: ^6.1.0
+ checksum: 27865d84d90030db1a9e5a66bc0b0ae079706fb7be635ec1e9bd4f64771e819aae78f0a026c6629d3a1a2eb277fcd51977315c049c47a70df1dd95d1d4106982
languageName: node
linkType: hard
@@ -14648,13 +14656,6 @@ __metadata:
languageName: node
linkType: hard
-"emojis-list@npm:^2.0.0":
- version: 2.1.0
- resolution: "emojis-list@npm:2.1.0"
- checksum: fb61fa6356dfcc9fbe6db8e334c29da365a34d3d82a915cb59621883d3023d804fd5edad5acd42b8eec016936e81d3b38e2faf921b32e073758374253afe1272
- languageName: node
- linkType: hard
-
"emojis-list@npm:^3.0.0":
version: 3.0.0
resolution: "emojis-list@npm:3.0.0"
@@ -15570,15 +15571,16 @@ __metadata:
languageName: node
linkType: hard
-"eth-block-tracker@npm:^6.0.0":
- version: 6.0.0
- resolution: "eth-block-tracker@npm:6.0.0"
+"eth-block-tracker@npm:^7.0.0":
+ version: 7.0.0
+ resolution: "eth-block-tracker@npm:7.0.0"
dependencies:
+ "@metamask/eth-json-rpc-provider": ^1.0.0
"@metamask/safe-event-emitter": ^2.0.0
"@metamask/utils": ^3.0.1
json-rpc-random-id: ^1.0.1
pify: ^3.0.0
- checksum: ad1199b822a9a3ff2673ecc92ca7cda0a37828e5bfd1927fd917a8085a99904fc29d3ef2392068bcfb14e47589df097940ef28f3e9025d1681e56a89b07e284e
+ checksum: b76f6ba022947eec0161e5592bc5386e8f05bff8a2c3e0e10c76bce21bc51900ef1cb153eb8bf31858fb0027e929c6a85a159bdf84aa1e3ef77b24e53e82ba84
languageName: node
linkType: hard
@@ -15647,21 +15649,22 @@ __metadata:
languageName: node
linkType: hard
-"eth-json-rpc-middleware@npm:^8.1.0":
- version: 8.1.0
- resolution: "eth-json-rpc-middleware@npm:8.1.0"
+"eth-json-rpc-middleware@npm:^9.0.0":
+ version: 9.0.1
+ resolution: "eth-json-rpc-middleware@npm:9.0.1"
dependencies:
+ "@metamask/eth-sig-util": ^5.0.0
"@metamask/safe-event-emitter": ^2.0.0
+ "@metamask/utils": ^3.0.3
btoa: ^1.2.1
clone: ^2.1.1
eth-block-tracker: ^5.0.1
eth-rpc-errors: ^4.0.3
- eth-sig-util: ^1.4.2
json-rpc-engine: ^6.1.0
json-stable-stringify: ^1.0.1
node-fetch: ^2.6.7
pify: ^3.0.0
- checksum: ec10bbc04e3b7696f82db2db528b052c8f6de811c90a12d4eb32f23cbe6ea198d86656afa5b53c52de06b631fef633cf29409bb56c04a16f173da94ee1d89ab6
+ checksum: 9512829a6958df6ef739b891a0c0804b51a140407fd2e3ddaaa6b18d975796646cfcf7f7305a18beb7903db09e0c7a91b06dc5434b6bd2d6cdb85d992d9fd3ab
languageName: node
linkType: hard
@@ -23288,17 +23291,6 @@ __metadata:
languageName: node
linkType: hard
-"loader-utils@npm:1.2.3":
- version: 1.2.3
- resolution: "loader-utils@npm:1.2.3"
- dependencies:
- big.js: ^5.2.2
- emojis-list: ^2.0.0
- json5: ^1.0.1
- checksum: 385407fc2683b6d664276fd41df962296de4a15030bb24389de77b175570c3b56bd896869376ba14cf8b33a9e257e17a91d395739ba7e23b5b68a8749a41df7e
- languageName: node
- linkType: hard
-
"loader-utils@npm:^1.1.0, loader-utils@npm:^1.2.3":
version: 1.4.0
resolution: "loader-utils@npm:1.4.0"
@@ -23311,13 +23303,13 @@ __metadata:
linkType: hard
"loader-utils@npm:^2.0.0":
- version: 2.0.0
- resolution: "loader-utils@npm:2.0.0"
+ version: 2.0.4
+ resolution: "loader-utils@npm:2.0.4"
dependencies:
big.js: ^5.2.2
emojis-list: ^3.0.0
json5: ^2.1.2
- checksum: 6856423131b50b6f5f259da36f498cfd7fc3c3f8bb17777cf87fdd9159e797d4ba4288d9a96415fd8da62c2906960e88f74711dee72d03a9003bddcd0d364a51
+ checksum: a5281f5fff1eaa310ad5e1164095689443630f3411e927f95031ab4fb83b4a98f388185bb1fe949e8ab8d4247004336a625e9255c22122b815bb9a4c5d8fc3b7
languageName: node
linkType: hard
@@ -24277,7 +24269,7 @@ __metadata:
"@metamask/assets-controllers": ^4.0.1
"@metamask/auto-changelog": ^2.1.0
"@metamask/base-controller": ^1.0.0
- "@metamask/contract-metadata": ^2.2.0
+ "@metamask/contract-metadata": ^2.3.1
"@metamask/controller-utils": ^1.0.0
"@metamask/design-tokens": ^1.9.0
"@metamask/desktop": ^0.3.0
@@ -24286,8 +24278,9 @@ __metadata:
"@metamask/eslint-config-mocha": ^9.0.0
"@metamask/eslint-config-nodejs": ^9.0.0
"@metamask/eslint-config-typescript": ^9.0.1
- "@metamask/eth-json-rpc-infura": ^7.0.0
- "@metamask/eth-json-rpc-middleware": ^10.0.0
+ "@metamask/eth-json-rpc-infura": ^8.0.0
+ "@metamask/eth-json-rpc-middleware": ^11.0.0
+ "@metamask/eth-json-rpc-provider": ^1.0.0
"@metamask/eth-keyring-controller": ^10.0.1
"@metamask/eth-ledger-bridge-keyring": ^0.13.0
"@metamask/eth-token-tracker": ^4.0.0
@@ -24420,7 +24413,7 @@ __metadata:
eslint-plugin-react: ^7.23.1
eslint-plugin-react-hooks: ^4.2.0
eslint-plugin-storybook: ^0.6.4
- eth-block-tracker: ^6.0.0
+ eth-block-tracker: ^7.0.0
eth-ens-namehash: ^2.0.8
eth-json-rpc-filters: ^6.0.0
eth-lattice-keyring: ^0.12.3
@@ -24536,7 +24529,7 @@ __metadata:
remove-trailing-slash: ^0.1.1
require-from-string: ^2.0.2
reselect: ^3.0.1
- resolve-url-loader: ^3.1.2
+ resolve-url-loader: ^3.1.5
safe-event-emitter: ^1.0.1
sass: ^1.32.4
sass-loader: ^10.1.1
@@ -27730,14 +27723,14 @@ __metadata:
languageName: node
linkType: hard
-"postcss@npm:7.0.21":
- version: 7.0.21
- resolution: "postcss@npm:7.0.21"
+"postcss@npm:7.0.36":
+ version: 7.0.36
+ resolution: "postcss@npm:7.0.36"
dependencies:
chalk: ^2.4.2
source-map: ^0.6.1
supports-color: ^6.1.0
- checksum: 5c11d58a4ffd54ddaf2f2f18ef7be10fc44405559ee56b52e41db8305d1b184d162138994dcce506ab77eef7283887a72d1b81cd1036c7fee106f50af0ef86d3
+ checksum: 4cfc0989b9ad5d0e8971af80d87f9c5beac5c84cb89ff22ad69852edf73c0a2fa348e7e0a135b5897bf893edad0fe86c428769050431ad9b532f072ff530828d
languageName: node
linkType: hard
@@ -30027,21 +30020,21 @@ __metadata:
languageName: node
linkType: hard
-"resolve-url-loader@npm:^3.1.2":
- version: 3.1.2
- resolution: "resolve-url-loader@npm:3.1.2"
+"resolve-url-loader@npm:^3.1.5":
+ version: 3.1.5
+ resolution: "resolve-url-loader@npm:3.1.5"
dependencies:
adjust-sourcemap-loader: 3.0.0
camelcase: 5.3.1
compose-function: 3.0.3
convert-source-map: 1.7.0
es6-iterator: 2.0.3
- loader-utils: 1.2.3
- postcss: 7.0.21
+ loader-utils: ^1.2.3
+ postcss: 7.0.36
rework: 1.0.1
rework-visit: 1.0.0
source-map: 0.6.1
- checksum: 02e559af8d10a8fda8d2cb1c61290b932787309309839288820438b4f25339a8c8cbd52598af89c1c1d277133d74914407e7a760e49acd966425a038798a6e70
+ checksum: eb52911eff20723f07409cc12138d254fa0dd4a4f3b1ba11ee1b29912afb03f1272aaddb523658be1e3a946e0d1bf6f603d0e107753ab83d48ad2116cf04b7f6
languageName: node
linkType: hard
@@ -30471,10 +30464,10 @@ __metadata:
languageName: node
linkType: hard
-"safe-stable-stringify@npm:^2.1.0":
- version: 2.3.1
- resolution: "safe-stable-stringify@npm:2.3.1"
- checksum: a0a0bad0294c3e2a9d1bf3cf2b1096dfb83c162d09a5e4891e488cce082120bd69161d2a92aae7fc48255290f17700decae9c89a07fe139794e61b5c8b411377
+"safe-stable-stringify@npm:^2.1.0, safe-stable-stringify@npm:^2.3.2":
+ version: 2.4.2
+ resolution: "safe-stable-stringify@npm:2.4.2"
+ checksum: 0324ba2e40f78cae63e31a02b1c9bdf1b786621f9e8760845608eb9e81aef401944ac2078e5c9c1533cf516aea34d08fa8052ca853637ced84b791caaf1e394e
languageName: node
linkType: hard
@@ -35064,8 +35057,8 @@ __metadata:
linkType: hard
"webpack@npm:>=4.43.0 <6.0.0, webpack@npm:^5.75.0, webpack@npm:^5.9.0":
- version: 5.75.0
- resolution: "webpack@npm:5.75.0"
+ version: 5.76.2
+ resolution: "webpack@npm:5.76.2"
dependencies:
"@types/eslint-scope": ^3.7.3
"@types/estree": ^0.0.51
@@ -35096,7 +35089,7 @@ __metadata:
optional: true
bin:
webpack: bin/webpack.js
- checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a
+ checksum: 86db98299a175c371031449c26077e87b33acd8f45de7f7945ed4b9b37c8ca11bc5169af9c44743efccd4d55e08042a3aa3a3bc42aff831309a0821ffbcd395e
languageName: node
linkType: hard