parent
b430cbd064
commit
8bfa40d2d3
@ -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'), |
||||
] |
||||
|
@ -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 |
||||
} |
||||
} |
Loading…
Reference in new issue