-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Rodrigo <[email protected]>
- Loading branch information
Showing
4 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/background/src/infrastructure/stores/migrator/migrations/migration-75.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { BlankAppState } from '../../../../utils/constants/initialState'; | ||
import { IMigration } from '../IMigration'; | ||
|
||
/** | ||
* This migration updates the currency icon for morph | ||
*/ | ||
export default { | ||
migrate: async (persistedState: BlankAppState) => { | ||
const { availableNetworks } = persistedState.NetworkController; | ||
const updatedNetworks = { ...availableNetworks }; | ||
|
||
const key = `CHAIN-2810`; | ||
if (key in availableNetworks) { | ||
updatedNetworks[key] = { | ||
...updatedNetworks[key], | ||
nativeCurrency: { | ||
...updatedNetworks[key].nativeCurrency, | ||
logo: 'https://raw.githubusercontent.com/block-wallet/assets/master/blockchains/ethereum/info/logo.png', | ||
}, | ||
}; | ||
} | ||
|
||
return { | ||
...persistedState, | ||
NetworkController: { | ||
...persistedState.NetworkController, | ||
availableNetworks: { ...updatedNetworks }, | ||
}, | ||
}; | ||
}, | ||
version: '1.1.25', | ||
} as IMigration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters