aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/migrations/template.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-04-10 04:56:59 +0800
committerGitHub <noreply@github.com>2018-04-10 04:56:59 +0800
commitdf1f891585dc41a7d725d592902a84e432e66dc4 (patch)
treee450c931e8d6d4a1277fd57e330fa8882d7cc93f /app/scripts/migrations/template.js
parent931ce120737210cbbf6736b454580ac0610f527a (diff)
parent305f5f0034f347ee3eacbc4e6ef41817c1de9ab2 (diff)
downloadtangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.gz
tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.zst
tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.zip
Merge branch 'master' into i3621-LogoPerformance
Diffstat (limited to 'app/scripts/migrations/template.js')
-rw-r--r--app/scripts/migrations/template.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/scripts/migrations/template.js b/app/scripts/migrations/template.js
new file mode 100644
index 000000000..0915c6bdf
--- /dev/null
+++ b/app/scripts/migrations/template.js
@@ -0,0 +1,29 @@
+// next version number
+const version = 0
+
+/*
+
+description of migration and what it does
+
+*/
+
+const clone = require('clone')
+
+module.exports = {
+ version,
+
+ migrate: async function (originalVersionedData) {
+ const versionedData = clone(originalVersionedData)
+ versionedData.meta.version = version
+ const state = versionedData.data
+ const newState = transformState(state)
+ versionedData.data = newState
+ return versionedData
+ },
+}
+
+function transformState (state) {
+ const newState = state
+ // transform state here
+ return newState
+}