mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
23 lines
500 B
JavaScript
23 lines
500 B
JavaScript
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
|
|
},
|
|
}
|