diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-05-12 04:10:54 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-05-12 04:10:54 +0800 |
commit | 8bfa40d2d36b11f9408e94ab82d44ac2703f760c (patch) | |
tree | ddd14b153820226f8f1b3e154f8a3c052f2aa2b1 /app/scripts | |
parent | b430cbd064fa8564e8f8edf7c6f5517a42646504 (diff) | |
download | tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar.gz tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar.bz2 tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar.lz tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar.xz tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.tar.zst tangerine-wallet-browser-8bfa40d2d36b11f9408e94ab82d44ac2703f760c.zip |
Move all users to new scalable backend
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/lib/migrations.js | 11 | ||||
-rw-r--r-- | app/scripts/migrations/004.js | 22 |
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 + } +} |