From 29da5cc7e8ff9106792d226bc62bbf3b52d3950e Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 9 Dec 2019 13:11:44 -0330 Subject: [PATCH] Remove some unused MetaMaskController methods (#7666) --- app/scripts/metamask-controller.js | 39 ------------------------------ ui/app/store/actions.js | 6 ----- 2 files changed, 45 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 77a596a57..5dd7ee691 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -443,7 +443,6 @@ module.exports = class MetamaskController extends EventEmitter { setMetaMetricsSendCount: this.setMetaMetricsSendCount.bind(this), setFirstTimeFlowType: this.setFirstTimeFlowType.bind(this), setCurrentLocale: this.setCurrentLocale.bind(this), - markAccountsFound: this.markAccountsFound.bind(this), markPasswordForgotten: this.markPasswordForgotten.bind(this), unMarkPasswordForgotten: this.unMarkPasswordForgotten.bind(this), getGasPrice: (cb) => cb(null, this.getGasPrice()), @@ -1207,44 +1206,6 @@ module.exports = class MetamaskController extends EventEmitter { } } - // --------------------------------------------------------------------------- - // MetaMask Version 3 Migration Account Restauration Methods - - /** - * A legacy method (probably dead code) that was used when we swapped out our - * key management library that we depended on. - * - * Described in: - * https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd - * - * @deprecated - * @param {} migratorOutput - */ - restoreOldVaultAccounts (migratorOutput) { - const { serialized } = migratorOutput - return this.keyringController.restoreKeyring(serialized) - .then(() => migratorOutput) - } - - /** - * A legacy method used to record user confirmation that they understand - * that some of their accounts have been recovered but should be backed up. - * This function no longer does anything and will be removed. - * - * @deprecated - * @param {Function} cb - A callback function called with a full state update. - */ - markAccountsFound (cb) { - // TODO Remove me - cb(null, this.getState()) - } - - /** - * An account object - * @typedef Account - * @property string privateKey - The private key of the account. - */ - //============================================================================= // END (VAULT / KEYRING RELATED METHODS) //============================================================================= diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index 2a578743a..a9d213876 100644 --- a/ui/app/store/actions.js +++ b/ui/app/store/actions.js @@ -57,7 +57,6 @@ const actions = { // remote state UPDATE_METAMASK_STATE: 'UPDATE_METAMASK_STATE', updateMetamaskState: updateMetamaskState, - markAccountsFound, // intialize screen CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS', SHOW_CREATE_VAULT: 'SHOW_CREATE_VAULT', @@ -1803,11 +1802,6 @@ function goBackToInitView () { } } -function markAccountsFound () { - log.debug(`background.markAccountsFound`) - return callBackgroundThenUpdate(background.markAccountsFound) -} - function retryTransaction (txId, gasPrice) { log.debug(`background.retryTransaction`) let newTxId