mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
Fixed balance error when creating a new EOA account (#20585)
This commit is contained in:
parent
f36261a9a6
commit
a478f675f1
@ -376,8 +376,8 @@ export const getMetaMaskAccountsConnected = createSelector(
|
||||
);
|
||||
|
||||
export function isBalanceCached(state) {
|
||||
const selectedAccountBalance =
|
||||
state.metamask.accounts[getSelectedAddress(state)].balance;
|
||||
const selectedAccount = state.metamask.accounts[getSelectedAddress(state)];
|
||||
const selectedAccountBalance = selectedAccount && selectedAccount.balance;
|
||||
const cachedBalance = getSelectedAccountCachedBalance(state);
|
||||
|
||||
return Boolean(!selectedAccountBalance && cachedBalance);
|
||||
|
Loading…
Reference in New Issue
Block a user