From 11cd32c1e67783786beef04b994e27f9a1898d44 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 13 Jun 2024 16:57:16 +0200 Subject: [PATCH] refactor(multichain): use ternary in getMaybeSelectedInternalAccount Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> --- ui/selectors/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index a13494399bb0..edd34fcfd1d0 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -331,7 +331,7 @@ export function getMaybeSelectedInternalAccount(state) { // Same as `getSelectedInternalAccount`, but might potentially be `undefined`: // - This might happen during the onboarding const accountId = state.metamask.internalAccounts?.selectedAccount; - return accountId && state.metamask.internalAccounts?.accounts[accountId]; + return accountId ? state.metamask.internalAccounts?.accounts[accountId] : undefined; } export function getSelectedInternalAccount(state) {