From 35f50689c1c2bcf86ccbb287382d521023612d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=CC=81ssio=20Marcos=20Goulart?= Date: Wed, 20 Nov 2024 17:33:02 -0300 Subject: [PATCH] Prevent infinity spinner when switching to same account --- .../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); }