1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

fix:fix error of balance fetching when add/import an account (#20612)

This commit is contained in:
Danica Shen 2023-08-25 20:05:28 +01:00 committed by GitHub
parent 71357b225a
commit c3f907fe4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -764,9 +764,8 @@ export function getWeb3ShimUsageStateForOrigin(state, origin) {
export function getSwapsDefaultToken(state) {
const selectedAccount = getSelectedAccount(state);
const { balance } = selectedAccount;
const balance = selectedAccount?.balance;
const chainId = getCurrentChainId(state);
const defaultTokenObject = SWAPS_CHAINID_DEFAULT_TOKEN_MAP[chainId];
return {