From 28ee0aae9131e4543759e48b8879c364b20a60ac Mon Sep 17 00:00:00 2001 From: frankiebee Date: Tue, 30 Jan 2018 14:02:41 -0800 Subject: creater migration to remove BlacklistController --- app/scripts/migrations/021.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/scripts/migrations/021.js (limited to 'app/scripts/migrations') diff --git a/app/scripts/migrations/021.js b/app/scripts/migrations/021.js new file mode 100644 index 000000000..0d3f35b77 --- /dev/null +++ b/app/scripts/migrations/021.js @@ -0,0 +1,33 @@ +const version = 21 + +/* + +This migration removes the BlackListController from disk state + +*/ + +const clone = require('clone') + +module.exports = { + version, + + migrate: function (originalVersionedData) { + const versionedData = clone(originalVersionedData) + versionedData.meta.version = version + try { + const state = versionedData.data + const newState = transformState(state) + versionedData.data = newState + } catch (err) { + console.warn(`MetaMask Migration #${version}` + err.stack) + } + return Promise.resolve(versionedData) + }, +} + +function transformState (state) { + const newState = state + delete newState.BlacklistController + return newState +} + -- cgit v1.2.3