1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/app/scripts/migrations/004.js

23 lines
508 B
JavaScript
Raw Normal View History

2016-05-11 22:10:54 +02:00
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
}
}