Update screen/settings/ElectrumSettings.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Marcos Rodriguez Vélez 2025-01-08 00:50:44 -04:00 committed by GitHub
parent 57b74f10e2
commit 3932f4f90d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,7 +154,12 @@ const ElectrumSettings: React.FC = () => {
const serverExists = useCallback( const serverExists = useCallback(
(value: ElectrumServerItem) => { (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], [serverHistory],
); );