diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-01-31 06:02:41 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-01-31 06:07:32 +0800 |
commit | 28ee0aae9131e4543759e48b8879c364b20a60ac (patch) | |
tree | b9c24e6efc3cca0884c5e2d080bd7df111c19553 /app | |
parent | f13ad6bd6a3b57851e20b6abe2715ef3dacc1e66 (diff) | |
download | tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar.gz tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar.bz2 tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar.lz tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar.xz tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.tar.zst tangerine-wallet-browser-28ee0aae9131e4543759e48b8879c364b20a60ac.zip |
creater migration to remove BlacklistController
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/migrations/021.js | 33 |
1 files changed, 33 insertions, 0 deletions
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 +} + |