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], );