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) //============================================================================= diff --git a/development/states/account-list-with-imported.json b/development/states/account-list-with-imported.json index 41d586db6..5ca5283b2 100644 --- a/development/states/account-list-with-imported.json +++ b/development/states/account-list-with-imported.json @@ -60,7 +60,6 @@ ] } ], - "lostAccounts": [], "seedWords": null }, "appState": { diff --git a/development/states/accounts-loose.json b/development/states/accounts-loose.json index df51f0d7e..43f4b0c18 100644 --- a/development/states/accounts-loose.json +++ b/development/states/accounts-loose.json @@ -102,8 +102,7 @@ "aa25854c0379e53c957ac9382e720c577fa31fd5" ] } - ], - "lostAccounts": [] + ] }, "appState": { "menuOpen": false, diff --git a/development/states/add-token.json b/development/states/add-token.json index 6de25664a..7ac344d13 100644 --- a/development/states/add-token.json +++ b/development/states/add-token.json @@ -93,7 +93,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": null, "gasPrice": null, @@ -104,7 +103,7 @@ "amount": "0x0", "memo": "", "errors": {}, - "warnings": {}, + "warnings": {}, "maxModeOn": false, "editingTransactionId": null }, diff --git a/development/states/compilation-bug.json b/development/states/compilation-bug.json index 588d069d4..84b0c5481 100644 --- a/development/states/compilation-bug.json +++ b/development/states/compilation-bug.json @@ -103,8 +103,7 @@ "keyringTypes": [ "Simple Key Pair", "HD Key Tree" - ], - "lostAccounts": [] + ] }, "appState": { "menuOpen": false, diff --git a/development/states/conf-tx.json b/development/states/conf-tx.json index 3d118a861..b47db9e80 100644 --- a/development/states/conf-tx.json +++ b/development/states/conf-tx.json @@ -191,7 +191,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/confirm-new-ui.json b/development/states/confirm-new-ui.json index 8eb536a31..f03b67202 100644 --- a/development/states/confirm-new-ui.json +++ b/development/states/confirm-new-ui.json @@ -110,7 +110,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": "0xea60", "gasPrice": "0xba43b7400", diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json index d93723f62..16199f48f 100644 --- a/development/states/confirm-sig-requests.json +++ b/development/states/confirm-sig-requests.json @@ -133,7 +133,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": "0xea60", "gasPrice": "0xba43b7400", diff --git a/development/states/currency-localization.json b/development/states/currency-localization.json index af6d1a4e3..9d5f771c2 100644 --- a/development/states/currency-localization.json +++ b/development/states/currency-localization.json @@ -95,7 +95,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": null, "gasPrice": null, diff --git a/development/states/first-time.json b/development/states/first-time.json index 2c634160f..c6c4899d8 100644 --- a/development/states/first-time.json +++ b/development/states/first-time.json @@ -34,7 +34,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "tokens": [], "currentLocale": "en", "preferences": { diff --git a/development/states/import-private-key-warning.json b/development/states/import-private-key-warning.json index 80ebc650d..05ad753dc 100644 --- a/development/states/import-private-key-warning.json +++ b/development/states/import-private-key-warning.json @@ -72,8 +72,7 @@ "01208723ba84e15da2e71656544a2963b0c06d40" ] } - ], - "lostAccounts": [] + ] }, "appState": { "menuOpen": false, diff --git a/development/states/import-private-key.json b/development/states/import-private-key.json index bd455c6d5..ed35640b4 100644 --- a/development/states/import-private-key.json +++ b/development/states/import-private-key.json @@ -44,8 +44,7 @@ "01208723ba84e15da2e71656544a2963b0c06d40" ] } - ], - "lostAccounts": [] + ] }, "appState": { "menuOpen": false, diff --git a/development/states/lost-accounts.json b/development/states/lost-accounts.json deleted file mode 100644 index 283b01815..000000000 --- a/development/states/lost-accounts.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "metamask": { - "currentCurrency": "USD", - "lostAccounts": [ - "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc", - "0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b" - ], - "conversionRate": 11.06608791, - "conversionDate": 1470421024, - "isInitialized": true, - "isUnlocked": true, - "currentDomain": "example.com", - "rpcTarget": "https://rawtestrpc.metamask.io/", - "identities": { - "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": { - "name": "Wallet 1", - "address": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc", - "mayBeFauceting": false - }, - "0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b": { - "name": "Wallet 2", - "address": "0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b", - "mayBeFauceting": false - }, - "0xeb9e64b93097bc15f01f13eae97015c57ab64823": { - "name": "Wallet 3", - "address": "0xeb9e64b93097bc15f01f13eae97015c57ab64823", - "mayBeFauceting": false - }, - "0x704107d04affddd9b66ab9de3dd7b095852e9b69": { - "name": "Wallet 4", - "address": "0x704107d04affddd9b66ab9de3dd7b095852e9b69", - "mayBeFauceting": false - } - }, - "unconfTxs": {}, - "accounts": { - "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": { - "code": "0x", - "balance": "0x100000000000", - "nonce": "0x0", - "address": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc" - }, - "0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b": { - "code": "0x", - "nonce": "0x0", - "balance": "0x100000000000", - "address": "0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b" - }, - "0xeb9e64b93097bc15f01f13eae97015c57ab64823": { - "code": "0x", - "nonce": "0x0", - "balance": "0x100000000000", - "address": "0xeb9e64b93097bc15f01f13eae97015c57ab64823" - }, - "0x704107d04affddd9b66ab9de3dd7b095852e9b69": { - "code": "0x", - "balance": "0x0", - "nonce": "0x0", - "address": "0x704107d04affddd9b66ab9de3dd7b095852e9b69" - } - }, - "transactions": [], - "network": "2", - "seedWords": null, - "unconfMsgs": {}, - "messages": [], - "provider": { - "type": "testnet" - }, - "selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc" - }, - "appState": { - "menuOpen": false, - "currentView": { - "name": "accountDetail", - "detailView": null, - "context": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc" - }, - "accountDetail": { - "subview": "transactions" - }, - "currentDomain": "127.0.0.1:9966", - "transForward": true, - "isLoading": false, - "warning": null - }, - "identities": {} -} diff --git a/development/states/navigate-txs.json b/development/states/navigate-txs.json index 584a754f0..4e47f8bca 100644 --- a/development/states/navigate-txs.json +++ b/development/states/navigate-txs.json @@ -232,8 +232,7 @@ "rinkeby": "ok", "ropsten": "ok", "goerli": "ok" - }, - "lostAccounts": [] + } }, "appState": { "shouldClose": false, diff --git a/development/states/pending-tx-insufficient.json b/development/states/pending-tx-insufficient.json index 8c16f6518..feadbc9c0 100644 --- a/development/states/pending-tx-insufficient.json +++ b/development/states/pending-tx-insufficient.json @@ -86,7 +86,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "seedWords": null }, "appState": { diff --git a/development/states/pending-tx.json b/development/states/pending-tx.json index 28c1751bd..82406a59d 100644 --- a/development/states/pending-tx.json +++ b/development/states/pending-tx.json @@ -707,8 +707,7 @@ "rinkeby": "ok", "goerli": "ok" }, - "shapeShiftTxList": [], - "lostAccounts": [] + "shapeShiftTxList": [] }, "appState": { "shouldClose": true, diff --git a/development/states/personal-sign.json b/development/states/personal-sign.json index f1941a19c..1017514a0 100644 --- a/development/states/personal-sign.json +++ b/development/states/personal-sign.json @@ -78,8 +78,7 @@ "provider": { "type": "testnet" }, - "shapeShiftTxList": [], - "lostAccounts": [] + "shapeShiftTxList": [] }, "appState": { "menuOpen": false, diff --git a/development/states/private-key-export-success.json b/development/states/private-key-export-success.json index 2ff3c4d17..8f38895dd 100644 --- a/development/states/private-key-export-success.json +++ b/development/states/private-key-export-success.json @@ -48,7 +48,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "seedWords": null }, "appState": { diff --git a/development/states/private-key-export.json b/development/states/private-key-export.json index db7a53e22..d41bfc2a2 100644 --- a/development/states/private-key-export.json +++ b/development/states/private-key-export.json @@ -48,7 +48,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "seedWords": null }, "appState": { diff --git a/development/states/send-edit.json b/development/states/send-edit.json index 1b33e6edc..b6130643b 100644 --- a/development/states/send-edit.json +++ b/development/states/send-edit.json @@ -128,7 +128,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": "0xea60", "gasPrice": "0xba43b7400", diff --git a/development/states/send-new-ui.json b/development/states/send-new-ui.json index ed690a672..bcfc76221 100644 --- a/development/states/send-new-ui.json +++ b/development/states/send-new-ui.json @@ -96,7 +96,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "send": { "gasLimit": null, "gasPrice": null, diff --git a/development/states/send.json b/development/states/send.json index 0dfcca1c4..bc1fb9034 100644 --- a/development/states/send.json +++ b/development/states/send.json @@ -86,7 +86,6 @@ "type": "testnet" }, "shapeShiftTxList": [], - "lostAccounts": [], "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/tx-list-items.json b/development/states/tx-list-items.json index 2b2bda2da..fd60003ba 100644 --- a/development/states/tx-list-items.json +++ b/development/states/tx-list-items.json @@ -1053,7 +1053,6 @@ {"depositAddress":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke","depositType":"BTC","key":"shapeshift","response":{"status":"no_deposits","address":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke"},"time":1522347459106}, {"depositAddress":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkkq","depositType":"BTC","key":"shapeshift","response":{"status":"no_deposits","address":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkkq"},"time":1522345459106} ], - "lostAccounts": [], "send": {}, "currentLocale": "en", "preferences": { diff --git a/test/data/2-state.json b/test/data/2-state.json index d41a403ff..fe1d15cc1 100644 --- a/test/data/2-state.json +++ b/test/data/2-state.json @@ -64,7 +64,6 @@ "noActiveNotices": true, "shapeShiftTxList": [], "infuraNetworkStatus": {}, - "lostAccounts": [], "seedWords": "debris dizzy just program just float decrease vacant alarm reduce speak stadium", "forgottenPassword": null -} \ No newline at end of file +} diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller-test.js index effd7c0ce..4f642037a 100644 --- a/test/unit/app/controllers/metamask-controller-test.js +++ b/test/unit/app/controllers/metamask-controller-test.js @@ -758,14 +758,6 @@ describe('MetaMaskController', function () { }) }) - describe('#markAccountsFound', function () { - it('adds lost accounts to config manager data', function () { - metamaskController.markAccountsFound(noop) - const state = metamaskController.getState() - assert.deepEqual(state.lostAccounts, []) - }) - }) - describe('#markPasswordForgotten', function () { it('adds and sets forgottenPassword to config data to true', function () { metamaskController.markPasswordForgotten(noop) diff --git a/ui/app/pages/home/home.container.js b/ui/app/pages/home/home.container.js index f03ffdc02..fdcb3ded4 100644 --- a/ui/app/pages/home/home.container.js +++ b/ui/app/pages/home/home.container.js @@ -19,7 +19,6 @@ const mapStateToProps = state => { const { approvedOrigins, dismissedOrigins, - lostAccounts, suggestedTokens, providerRequests, migratedPrivacyMode, @@ -42,7 +41,6 @@ const mapStateToProps = state => { const isPopup = getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP return { - lostAccounts, forgottenPassword, suggestedTokens, unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), diff --git a/ui/app/pages/send/tests/send-selectors-test-data.js b/ui/app/pages/send/tests/send-selectors-test-data.js index 54a494b63..ff9c19b5b 100644 --- a/ui/app/pages/send/tests/send-selectors-test-data.js +++ b/ui/app/pages/send/tests/send-selectors-test-data.js @@ -157,7 +157,6 @@ module.exports = { { id: 'shapeShiftTx2', 'time': 1575000000000 }, { id: 'shapeShiftTx3', 'time': 1475000000000 }, ], - 'lostAccounts': [], 'send': { 'gasLimit': '0xFFFF', 'gasPrice': '0xaa', diff --git a/ui/app/selectors/tests/selectors-test-data.js b/ui/app/selectors/tests/selectors-test-data.js index 54a494b63..ff9c19b5b 100644 --- a/ui/app/selectors/tests/selectors-test-data.js +++ b/ui/app/selectors/tests/selectors-test-data.js @@ -157,7 +157,6 @@ module.exports = { { id: 'shapeShiftTx2', 'time': 1575000000000 }, { id: 'shapeShiftTx3', 'time': 1475000000000 }, ], - 'lostAccounts': [], 'send': { 'gasLimit': '0xFFFF', 'gasPrice': '0xaa', diff --git a/ui/lib/lost-accounts-notice.js b/ui/lib/lost-accounts-notice.js deleted file mode 100644 index 840bd8dca..000000000 --- a/ui/lib/lost-accounts-notice.js +++ /dev/null @@ -1,23 +0,0 @@ -const summary = require('../app/helpers/utils/util').addressSummary - -module.exports = function (lostAccounts) { - return { - date: new Date().toDateString(), - title: 'Account Problem Caught', - body: `MetaMask has fixed a bug where some accounts were previously mis-generated. This was a rare issue, but you were affected! - -We have successfully imported the accounts that were mis-generated, but they will no longer be recovered with your normal seed phrase. - -We have marked the affected accounts as "Loose", and recommend you transfer ether and tokens away from those accounts, or export & back them up elsewhere. - -Your affected accounts are: -${lostAccounts.map(acct => ` - ${summary(acct)}`).join('\n')} - -These accounts have been marked as "Loose" so they will be easy to recognize in the account list. - -For more information, please read [our blog post.][1] - -[1]: https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.7d8ktj4h3 - `, - } -}