1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/app/scripts/migrations/004.js

23 lines
500 B
JavaScript
Raw Normal View History

2016-05-11 22:10:54 +02:00
module.exports = {
version: 4,
2016-06-21 22:18:32 +02:00
migrate: function (data) {
2016-05-11 22:10:54 +02:00
try {
if (data.config.provider.type !== 'rpc') return data
switch (data.config.provider.rpcTarget) {
case 'https://testrpc.metamask.io/':
2016-06-21 22:18:32 +02:00
data.config.provider = {
type: 'testnet',
}
2016-05-11 22:10:54 +02:00
break
case 'https://rpc.metamask.io/':
2016-06-21 22:18:32 +02:00
data.config.provider = {
type: 'mainnet',
}
2016-05-11 22:10:54 +02:00
break
}
} catch (_) {}
return data
2016-06-21 22:18:32 +02:00
},
2016-05-11 22:10:54 +02:00
}