mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-12 20:57:12 +01:00
21 lines
518 B
JavaScript
21 lines
518 B
JavaScript
const version = 2
|
|
|
|
const clone = require('clone')
|
|
|
|
|
|
module.exports = {
|
|
version,
|
|
|
|
migrate: function (originalVersionedData) {
|
|
const versionedData = clone(originalVersionedData)
|
|
versionedData.meta.version = version
|
|
try {
|
|
if (versionedData.data.config.provider.type === 'etherscan') {
|
|
versionedData.data.config.provider.type = 'rpc'
|
|
versionedData.data.config.provider.rpcTarget = 'https://rpc.metamask.io/'
|
|
}
|
|
} catch (e) {}
|
|
return Promise.resolve(versionedData)
|
|
},
|
|
}
|