mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +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) {
|
export function isBalanceCached(state) {
|
||||||
const selectedAccountBalance =
|
const selectedAccount = state.metamask.accounts[getSelectedAddress(state)];
|
||||||
state.metamask.accounts[getSelectedAddress(state)].balance;
|
const selectedAccountBalance = selectedAccount && selectedAccount.balance;
|
||||||
const cachedBalance = getSelectedAccountCachedBalance(state);
|
const cachedBalance = getSelectedAccountCachedBalance(state);
|
||||||
|
|
||||||
return Boolean(!selectedAccountBalance && cachedBalance);
|
return Boolean(!selectedAccountBalance && cachedBalance);
|
||||||
|
Loading…
Reference in New Issue
Block a user