mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
24 lines
627 B
JavaScript
24 lines
627 B
JavaScript
|
const version = 40
|
||
|
const clone = require('clone')
|
||
|
|
||
|
/**
|
||
|
* Site connections are now managed by the PermissionsController, and the
|
||
|
* ProviderApprovalController is removed. This migration deletes all
|
||
|
* ProviderApprovalController state.
|
||
|
*/
|
||
|
module.exports = {
|
||
|
version,
|
||
|
migrate: async function (originalVersionedData) {
|
||
|
const versionedData = clone(originalVersionedData)
|
||
|
versionedData.meta.version = version
|
||
|
const state = versionedData.data
|
||
|
versionedData.data = transformState(state)
|
||
|
return versionedData
|
||
|
},
|
||
|
}
|
||
|
|
||
|
function transformState (state) {
|
||
|
delete state.ProviderApprovalController
|
||
|
return state
|
||
|
}
|