From ad7f9ac83092b2f87a5ee20c3022df9b5893eef2 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Mon, 25 Sep 2023 15:48:44 +0200 Subject: [PATCH] refactor: remove `keyringTypes` from test mocks --- .storybook/test-data.js | 6 ------ app/scripts/background.js | 1 - app/scripts/lib/setupSentry.js | 1 - .../errors-after-init-opt-in-background-state.json | 1 - .../state-snapshots/errors-after-init-opt-in-ui-state.json | 1 - test/jest/mock-store.js | 1 - ui/pages/token-allowance/token-allowance.test.js | 1 - 7 files changed, 12 deletions(-) diff --git a/.storybook/test-data.js b/.storybook/test-data.js index 353064992c42..b78ae04c0620 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -1062,12 +1062,6 @@ const state = { unapprovedEncryptionPublicKeyMsgCount: 0, unapprovedTypedMessages: {}, unapprovedTypedMessagesCount: 0, - keyringTypes: [ - KeyringType.imported, - KeyringType.hdKeyTree, - KeyringType.trezor, - KeyringType.ledger, - ], keyrings: [ { type: KeyringType.hdKeyTree, diff --git a/app/scripts/background.js b/app/scripts/background.js index b68936848354..6cf9c97f93d1 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -245,7 +245,6 @@ browser.runtime.onConnectExternal.addListener(async (...args) => { * @property {object} unapprovedTypedMsgs - An object of messages pending approval, mapping a unique ID to the options. * @property {number} unapprovedTypedMsgCount - The number of messages in unapprovedTypedMsgs. * @property {number} pendingApprovalCount - The number of pending request in the approval controller. - * @property {string[]} keyringTypes - An array of unique keyring identifying strings, representing available strategies for creating accounts. * @property {Keyring[]} keyrings - An array of keyring descriptions, summarizing the accounts that are available for use, and what keyrings they belong to. * @property {string} selectedAddress - A lower case hex string of the currently selected address. * @property {string} currentCurrency - A string identifying the user's preferred display currency, for use in showing conversion rates. diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js index 0d117f87e475..9dcb9526e5f6 100644 --- a/app/scripts/lib/setupSentry.js +++ b/app/scripts/lib/setupSentry.js @@ -113,7 +113,6 @@ export const SENTRY_BACKGROUND_STATE = { KeyringController: { isUnlocked: true, keyrings: false, - keyringTypes: false, }, LoggingController: { logs: false, diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json index 6325ba3e6376..a25f5b4e4fc4 100644 --- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json @@ -68,7 +68,6 @@ }, "KeyringController": { "isUnlocked": false, - "keyringTypes": "object", "keyrings": "object" }, "LoggingController": { diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json index 31aa72b082ee..fca7d4a8d776 100644 --- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -79,7 +79,6 @@ } }, "cachedBalances": "object", - "keyringTypes": "object", "keyrings": "object", "useNonceField": false, "usePhishDetect": true, diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index 4ceaded9cee0..96697f354f23 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -260,7 +260,6 @@ export const createSwapsMockStore = () => { }, selectedAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', currentLocale: 'en', - keyringTypes: [KeyringType.imported, KeyringType.hdKeyTree], keyrings: [ { type: KeyringType.hdKeyTree, diff --git a/ui/pages/token-allowance/token-allowance.test.js b/ui/pages/token-allowance/token-allowance.test.js index 7000fc0e23a0..d9f9021e6b5e 100644 --- a/ui/pages/token-allowance/token-allowance.test.js +++ b/ui/pages/token-allowance/token-allowance.test.js @@ -74,7 +74,6 @@ const state = { }, ], transactions: [], - keyringTypes: [], keyrings: [ { type: KeyringType.hdKeyTree,