mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 10:30:04 +01:00
76a2a9bb8b
* @metamask/eslint-config@5.0.0 * Update eslintrc and prettierrc * yarn lint:fix
23 lines
550 B
JavaScript
23 lines
550 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);
|
|
},
|
|
};
|