blob: e72eef2b771314d8b6ab316f3829360e7421c2ba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
const version = 4
module.exports = {
version,
migrate: function (meta) {
meta.version = version
try {
if (meta.data.config.provider.type !== 'rpc') return Promise.resolve(meta)
switch (meta.data.config.provider.rpcTarget) {
case 'https://testrpc.metamask.io/':
meta.data.config.provider = {
type: 'testnet',
}
break
case 'https://rpc.metamask.io/':
meta.data.config.provider = {
type: 'mainnet',
}
break
}
} catch (_) {}
return Promise.resolve(meta)
},
}
|