aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/migrations/003.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/migrations/003.js')
-rw-r--r--app/scripts/migrations/003.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/scripts/migrations/003.js b/app/scripts/migrations/003.js
index 617c55c09..eceaeaa4b 100644
--- a/app/scripts/migrations/003.js
+++ b/app/scripts/migrations/003.js
@@ -1,15 +1,17 @@
-var oldTestRpc = 'https://rawtestrpc.metamask.io/'
-var newTestRpc = 'https://testrpc.metamask.io/'
+const version = 3
+const oldTestRpc = 'https://rawtestrpc.metamask.io/'
+const newTestRpc = 'https://testrpc.metamask.io/'
module.exports = {
- version: 3,
+ version,
- migrate: function (data) {
+ migrate: function (versionedData) {
+ versionedData.meta.version = version
try {
- if (data.config.provider.rpcTarget === oldTestRpc) {
- data.config.provider.rpcTarget = newTestRpc
+ if (versionedData.data.config.provider.rpcTarget === oldTestRpc) {
+ versionedData.data.config.provider.rpcTarget = newTestRpc
}
} catch (e) {}
- return data
+ return Promise.resolve(versionedData)
},
}