parent
2d472470be
commit
04f1d692a4
@ -54,7 +54,10 @@ export const RelaysPage = () => {
|
|||||||
const relayMap = useAppSelector((state) => state.relays?.map)
|
const relayMap = useAppSelector((state) => state.relays?.map)
|
||||||
const relaysInfo = useAppSelector((state) => state.relays?.info)
|
const relaysInfo = useAppSelector((state) => state.relays?.info)
|
||||||
|
|
||||||
const webSocketPrefix = 'wss://'
|
const webSocketPrefix =
|
||||||
|
newRelayURI?.startsWith('wss://') || newRelayURI?.startsWith('ws://')
|
||||||
|
? ''
|
||||||
|
: 'wss://'
|
||||||
|
|
||||||
// fetch relay list from relays
|
// fetch relay list from relays
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -197,7 +200,7 @@ export const RelaysPage = () => {
|
|||||||
// Check if new relay URI is a valid string
|
// Check if new relay URI is a valid string
|
||||||
if (
|
if (
|
||||||
relayURI &&
|
relayURI &&
|
||||||
!/^wss:\/\/[-a-zA-Z0-9@:%._\\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}/.test(
|
!/^wss?:\/\/[-a-zA-Z0-9@:%._\\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}/.test(
|
||||||
relayURI
|
relayURI
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user