mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
21 lines
516 B
JavaScript
21 lines
516 B
JavaScript
const version = 2
|
|
|
|
const clone = require('clone')
|
|
|
|
|
|
module.exports = {
|
|
version,
|
|
|
|
migrate: function (originalVersionedData) {
|
|
let 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)
|
|
},
|
|
}
|