diff options
Move all users to new scalable backend
Diffstat (limited to 'app/scripts/migrations')
-rw-r--r-- | app/scripts/migrations/004.js | 22 |
1 files changed, 22 insertions, 0 deletions
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 + } +} |