From 19f486158281121a00995ca5befc7684e16d3894 Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:02:46 -0500 Subject: [PATCH] refactor: remove duplication of selectors in `selectors/confirm-transaction.js` (#27641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These selectors were duplicated because our circular dependencies were not letting us import them. Now that I've untangled a bunch of files we can import them just fine! --- ui/selectors/confirm-transaction.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/selectors/confirm-transaction.js b/ui/selectors/confirm-transaction.js index 10183c916652..2017c3c68932 100644 --- a/ui/selectors/confirm-transaction.js +++ b/ui/selectors/confirm-transaction.js @@ -42,17 +42,13 @@ import { getUnapprovedTransactions, selectTransactionMetadata, selectTransactionSender, + unapprovedPersonalMsgsSelector, + unapprovedDecryptMsgsSelector, + unapprovedEncryptionPublicKeyMsgsSelector, + unapprovedTypedMessagesSelector, } from './transactions'; const unapprovedTxsSelector = (state) => getUnapprovedTransactions(state); -const unapprovedPersonalMsgsSelector = (state) => - state.metamask.unapprovedPersonalMsgs; -const unapprovedDecryptMsgsSelector = (state) => - state.metamask.unapprovedDecryptMsgs; -const unapprovedEncryptionPublicKeyMsgsSelector = (state) => - state.metamask.unapprovedEncryptionPublicKeyMsgs; -const unapprovedTypedMessagesSelector = (state) => - state.metamask.unapprovedTypedMessages; export const unconfirmedTransactionsListSelector = createSelector( unapprovedTxsSelector,