Skip to content

Commit

Permalink
fixing currency logo (#678)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo <[email protected]>
  • Loading branch information
chk0912 and chk0912 authored Oct 10, 2024
1 parent e947f96 commit 912f3cd
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/background/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@block-wallet/background",
"version": "1.1.24",
"version": "1.1.25",
"private": true,
"dependencies": {
"@block-wallet/chains-assets": "https://github.com/block-wallet/chains-assets#v0.0.63",
"@block-wallet/chains-assets": "https://github.com/block-wallet/chains-assets#v0.0.65",
"@block-wallet/eth-ledger-bridge-keyring": "https://github.com/block-wallet/eth-ledger-bridge-keyring#v0.14.1",
"@block-wallet/eth-trezor-keyring": "https://github.com/block-wallet/eth-trezor-keyring#v1.0.1",
"@block-wallet/explorer-link": "https://github.com/block-wallet/explorer-link#v2.2.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import migration71 from './migration-71';
import migration72 from './migration-72';
import migration73 from './migration-73';
import migration74 from './migration-74';
import migration75 from './migration-75';

const migrations: IMigration[] = [
migration01,
Expand Down Expand Up @@ -149,6 +150,7 @@ const migrations: IMigration[] = [
migration72,
migration73,
migration74,
migration75,
];

export default (): IMigration[] => migrations;
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;
6 changes: 3 additions & 3 deletions packages/background/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"

"@block-wallet/chains-assets@https://github.com/block-wallet/chains-assets#v0.0.63":
version "0.0.63"
resolved "https://github.com/block-wallet/chains-assets#1322b3706cc0fbf434a61f55ab63823bff800452"
"@block-wallet/chains-assets@https://github.com/block-wallet/chains-assets#v0.0.65":
version "0.0.65"
resolved "https://github.com/block-wallet/chains-assets#e5cd2b2e82fe44bdaa20cd9e84adbeae4623d2af"

"@block-wallet/eth-ledger-bridge-keyring@https://github.com/block-wallet/eth-ledger-bridge-keyring#v0.14.1":
version "0.14.0"
Expand Down

0 comments on commit 912f3cd

Please sign in to comment.