aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/migrations
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-02-15 05:21:00 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-02-15 05:21:00 +0800
commitcd75d861874f300fdca7b20274d170d0023d6caf (patch)
treee28f70aeb29cb1461c4ec11126b2ca74b78f5fbc /app/scripts/migrations
parentec8aa3d1f28e24586031f36151a3b5b5490b3248 (diff)
downloadtangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar.gz
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar.bz2
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar.lz
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar.xz
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.tar.zst
tangerine-wallet-browser-cd75d861874f300fdca7b20274d170d0023d6caf.zip
Add migrations for removing terms of use data.
Diffstat (limited to 'app/scripts/migrations')
-rw-r--r--app/scripts/migrations/011.js30
-rw-r--r--app/scripts/migrations/index.js1
2 files changed, 31 insertions, 0 deletions
diff --git a/app/scripts/migrations/011.js b/app/scripts/migrations/011.js
new file mode 100644
index 000000000..227fd87f7
--- /dev/null
+++ b/app/scripts/migrations/011.js
@@ -0,0 +1,30 @@
+const version = 11
+
+/*
+
+This migration breaks out the CurrencyController substate
+
+*/
+
+module.exports = {
+ version,
+
+ migrate: function (versionedData) {
+ 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.TOSHash
+ delete newState.isDisclaimerConfirmed
+ return newState
+}
diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js
index 2db8646b0..a3dd48c17 100644
--- a/app/scripts/migrations/index.js
+++ b/app/scripts/migrations/index.js
@@ -21,4 +21,5 @@ module.exports = [
require('./008'),
require('./009'),
require('./010'),
+ require('./011'),
]