mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
a36e6d414b
This state has been removed from the background. It was used for the old UI, and has been unused for some time. A migration has been added to delete this state as well. The action creator responsible for updating this state has been removed from the UI as well, along with the `callBackgroundThenUpdateNoSpinner` convenience function, which was only used for this action.
24 lines
572 B
JavaScript
24 lines
572 B
JavaScript
const version = 43
|
|
import { cloneDeep } from 'lodash'
|
|
|
|
/**
|
|
* Remove unused 'currentAccountTab' state
|
|
*/
|
|
export default {
|
|
version,
|
|
migrate: async function (originalVersionedData) {
|
|
const versionedData = cloneDeep(originalVersionedData)
|
|
versionedData.meta.version = version
|
|
const state = versionedData.data
|
|
versionedData.data = transformState(state)
|
|
return versionedData
|
|
},
|
|
}
|
|
|
|
function transformState (state) {
|
|
if (state?.PreferencesController?.currentAccountTab) {
|
|
delete state.PreferencesController.currentAccountTab
|
|
}
|
|
return state
|
|
}
|