sigit.io/src/store/relays/action.ts
daniyal f9fcfb1c9e
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 34s
fix: manage pending relay connection requests
Also remove the getMostPopularRelays function and use a hardcoded list of relays
Further, if metadata event is not found from relays cache an empty metadata for that pubkey
2024-08-21 00:16:21 +05:00

24 lines
587 B
TypeScript

import * as ActionTypes from '../actionTypes'
import {
SetRelayMapAction,
SetRelayInfoAction,
SetRelayMapUpdatedAction
} from './types'
import { RelayMap, RelayInfoObject } from '../../types'
export const setRelayMapAction = (payload: RelayMap): SetRelayMapAction => ({
type: ActionTypes.SET_RELAY_MAP,
payload
})
export const setRelayInfoAction = (
payload: RelayInfoObject
): SetRelayInfoAction => ({
type: ActionTypes.SET_RELAY_INFO,
payload
})
export const setRelayMapUpdatedAction = (): SetRelayMapUpdatedAction => ({
type: ActionTypes.SET_RELAY_MAP_UPDATED
})