diff --git a/src/pages/settings/relays/index.tsx b/src/pages/settings/relays/index.tsx index 73e8c6f..7e86964 100644 --- a/src/pages/settings/relays/index.tsx +++ b/src/pages/settings/relays/index.tsx @@ -19,6 +19,7 @@ import { setRelayMapAction } from '../../../store/actions' import { RelayConnectionState, RelayFee, RelayInfo } from '../../../types' import { capitalizeFirstLetter, + compareObjects, getRelayInfo, getRelayMap, hexToNpub, @@ -43,7 +44,9 @@ export const RelaysPage = () => { useDidMount(() => { if (usersPubkey) { getRelayMap(usersPubkey).then((newRelayMap) => { - dispatch(setRelayMapAction(newRelayMap.map)) + if (!compareObjects(relayMap, newRelayMap.map)) { + dispatch(setRelayMapAction(newRelayMap.map)) + } }) } })