From 3932f4f90d1591e76ecc932b4e3286c43ddc67ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Wed, 8 Jan 2025 00:50:44 -0400 Subject: [PATCH] Update screen/settings/ElectrumSettings.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- screen/settings/ElectrumSettings.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/screen/settings/ElectrumSettings.tsx b/screen/settings/ElectrumSettings.tsx index 291f9a2c2..2877175e5 100644 --- a/screen/settings/ElectrumSettings.tsx +++ b/screen/settings/ElectrumSettings.tsx @@ -154,7 +154,12 @@ const ElectrumSettings: React.FC = () => { const serverExists = useCallback( (value: ElectrumServerItem) => { - return Array.from(serverHistory).some(s => `${s.host}:${s.tcp}:${s.ssl}` === `${value.host}:${value.tcp}:${value.ssl}`); + for (const s of serverHistory) { + if (`${s.host}:${s.tcp}:${s.ssl}` === `${value.host}:${value.tcp}:${value.ssl}`) { + return true; + } + } + return false; }, [serverHistory], );