mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
b6ccd22d6c
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
22 lines
533 B
JavaScript
22 lines
533 B
JavaScript
import { cloneDeep } from 'lodash'
|
|
|
|
const version = 2
|
|
|
|
export default {
|
|
version,
|
|
|
|
migrate (originalVersionedData) {
|
|
const versionedData = cloneDeep(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 (_) {
|
|
// empty
|
|
}
|
|
return Promise.resolve(versionedData)
|
|
},
|
|
}
|