aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-05-12 04:38:14 +0800
committerDan Finlay <somniac@me.com>2016-05-12 04:38:14 +0800
commit4270c61f158ce60c6fb909c44646035947521537 (patch)
tree9ee11aa418fd6eb43fdabd99f006a68ec22b2566 /app
parenta468294d2c836655b8e4479ade5057667e65513e (diff)
parent8bfa40d2d36b11f9408e94ab82d44ac2703f760c (diff)
downloadtangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar.gz
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar.bz2
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar.lz
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar.xz
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.tar.zst
tangerine-wallet-browser-4270c61f158ce60c6fb909c44646035947521537.zip
Merge pull request #183 from MetaMask/MigrateOffOldInfrastructure
Move all users to new scalable backend
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/migrations.js11
-rw-r--r--app/scripts/migrations/004.js22
2 files changed, 25 insertions, 8 deletions
diff --git a/app/scripts/lib/migrations.js b/app/scripts/lib/migrations.js
index 0b8e6265c..f026cbe53 100644
--- a/app/scripts/lib/migrations.js
+++ b/app/scripts/lib/migrations.js
@@ -1,10 +1,5 @@
-var path = require('path')
-var fs = require('fs')
-
-var migration2 = require('../migrations/002')
-var migration3 = require('../migrations/003')
-
module.exports = [
- migration2,
- migration3,
+ require('../migrations/002'),
+ require('../migrations/003'),
+ require('../migrations/004'),
]
diff --git a/app/scripts/migrations/004.js b/app/scripts/migrations/004.js
new file mode 100644
index 000000000..2e3164baf
--- /dev/null
+++ b/app/scripts/migrations/004.js
@@ -0,0 +1,22 @@
+module.exports = {
+ version: 4,
+
+ migrate: function(data) {
+ try {
+ if (data.config.provider.type !== 'rpc') return data
+ switch (data.config.provider.rpcTarget) {
+ case 'https://testrpc.metamask.io/':
+ data.config.provider = {
+ type: 'testnet'
+ }
+ break
+ case 'https://rpc.metamask.io/':
+ data.config.provider = {
+ type: 'mainnet'
+ }
+ break
+ }
+ } catch (_) {}
+ return data
+ }
+}