From aad0f96c125e8dc3f570a95faafb265d0452a8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Marcos=20Goulart?= <3228151+CassioMG@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:17:35 -0300 Subject: [PATCH] Prevent infinity spinner when switching to same account (#1692) --- .../components/identicons/AccountListIdenticon/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/src/popup/components/identicons/AccountListIdenticon/index.tsx b/extension/src/popup/components/identicons/AccountListIdenticon/index.tsx index fad51c0119..e2a371ddb8 100644 --- a/extension/src/popup/components/identicons/AccountListIdenticon/index.tsx +++ b/extension/src/popup/components/identicons/AccountListIdenticon/index.tsx @@ -32,7 +32,9 @@ export const AccountListIdenticon = ({ const shortPublicKey = truncatedPublicKey(publicKey); const handleMakeAccountActive = () => { - if (setLoading) { + // If this account is already active (selected) we don't need to load any + // more stuff, so let's just collapse the dropdown in this case + if (!active && setLoading) { setLoading(true); }