Skip to content

Commit

Permalink
EOD
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Oct 9, 2024
1 parent 36b7afc commit 725e181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chrome-extension/src/background/chains/ethereumHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const handleWalletAddEthereumChain = async (params, KEEPKEY_WALLET) => {
if (!params || !params[0] || !params[0].chainId) throw new Error('Invalid chainId (Required)');
let chainId = 'eip155:' + convertHexToDecimalChainId(params[0].chainId);
chainId = sanitizeChainId(chainId);
console.log(tag, 'Switching Chain chainId: ', chainId);

let currentProvider = await web3ProviderStorage.getWeb3Provider();

Expand All @@ -231,8 +232,9 @@ const handleWalletAddEthereumChain = async (params, KEEPKEY_WALLET) => {
};
console.log('currentProvider', currentProvider);
} else {
const chainIdToFind = sanitizeChainId(params[0].chainId);
let chainIdToFind = sanitizeChainId(params[0].chainId);
let chainFound = false;
chainIdToFind = parseInt(sanitizedChainId, 16).toString();

for (const key of Object.keys(EIP155_CHAINS)) {
if (EIP155_CHAINS[key].chainId === chainIdToFind) {
Expand All @@ -253,6 +255,7 @@ const handleWalletAddEthereumChain = async (params, KEEPKEY_WALLET) => {
}
assetContextStorage.updateContext(currentProvider);
// Save the updated provider to storage
// @ts-ignore
await web3ProviderStorage.saveWeb3Provider(currentProvider);

console.log('changing context to ', currentProvider.caip);
Expand Down
1 change: 1 addition & 0 deletions pages/popup/src/components/utxo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { requestStorage } from '@extension/storage';

import RequestDetailsCard from './RequestDetailsCard';
import RequestDataCard from './RequestDataCard';
//@ts-ignore
import CoinControl from './CoinControlCard';
import RequestMethodCard from './RequestMethodCard';
import ProjectFeeCard from './ProjectFeeCard';
Expand Down

0 comments on commit 725e181

Please sign in to comment.