From ceace71bf5989eb8137d7f0617a85ccaa92dce30 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Thu, 8 Aug 2019 17:03:10 -0230 Subject: Remove unused lostAccounts state (#6979) --- app/scripts/background.js | 1 - app/scripts/metamask-controller.js | 25 ------------------------- 2 files changed, 26 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/background.js b/app/scripts/background.js index 8e65bd5a4..cb87878a9 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -142,7 +142,6 @@ setupMetamaskMeshMetrics() * @property {Object} infuraNetworkStatus - An object of infura network status checks. * @property {Block[]} recentBlocks - An array of recent blocks, used to calculate an effective but cheap gas price. * @property {Array} shapeShiftTxList - An array of objects describing shapeshift exchange attempts. - * @property {Array} lostAccounts - TODO: Remove this feature. A leftover from the version-3 migration where our seed-phrase library changed to fix a bug where some accounts were mis-generated, but we recovered the old accounts as "lost" instead of losing them. * @property {boolean} forgottenPassword - Returns true if the user has initiated the password recovery screen, is recovering from seed phrase. */ diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index d999bb790..46788aaae 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -385,10 +385,6 @@ module.exports = class MetamaskController extends EventEmitter { return { ...{ isInitialized }, ...this.memStore.getFlatState(), - ...{ - // TODO: Remove usages of lost accounts - lostAccounts: [], - }, } } @@ -1177,27 +1173,6 @@ module.exports = class MetamaskController extends EventEmitter { * @property string privateKey - The private key of the account. */ - /** - * Probably no longer needed, related to the Version 3 migration. - * Imports a hash of accounts to private keys into the vault. - * - * Described in: - * https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd - * - * Uses the array's private keys to create a new Simple Key Pair keychain - * and add it to the keyring controller. - * @deprecated - * @param {Account[]} lostAccounts - - * @returns {Keyring[]} An array of the restored keyrings. - */ - importLostAccounts ({ lostAccounts }) { - const privKeys = lostAccounts.map(acct => acct.privateKey) - return this.keyringController.restoreKeyring({ - type: 'Simple Key Pair', - data: privKeys, - }) - } - //============================================================================= // END (VAULT / KEYRING RELATED METHODS) //============================================================================= -- cgit