fix(relay-controller): sigit relay immutability and relay list
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s
This commit is contained in:
parent
a788309126
commit
e0d6c03639
@ -86,11 +86,8 @@ export class RelayController {
|
|||||||
filter: Filter,
|
filter: Filter,
|
||||||
relayUrls: string[] = []
|
relayUrls: string[] = []
|
||||||
): Promise<Event[]> => {
|
): Promise<Event[]> => {
|
||||||
// add app relay to relays array
|
// Add app relay to relays array and connect to all specified relays
|
||||||
relayUrls.push(SIGIT_RELAY)
|
const relayPromises = [...relayUrls, SIGIT_RELAY].map((relayUrl) =>
|
||||||
|
|
||||||
// Connect to all specified relays
|
|
||||||
const relayPromises = relayUrls.map((relayUrl) =>
|
|
||||||
this.connectRelay(relayUrl)
|
this.connectRelay(relayUrl)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -204,11 +201,9 @@ export class RelayController {
|
|||||||
relayUrls: string[] = [],
|
relayUrls: string[] = [],
|
||||||
eventHandler: (event: Event) => void
|
eventHandler: (event: Event) => void
|
||||||
) => {
|
) => {
|
||||||
// add app relay to relays array
|
// Add app relay to relays array and connect to all specified relays
|
||||||
relayUrls.push(SIGIT_RELAY)
|
|
||||||
|
|
||||||
// Connect to all specified relays
|
const relayPromises = [...relayUrls, SIGIT_RELAY].map((relayUrl) =>
|
||||||
const relayPromises = relayUrls.map((relayUrl) =>
|
|
||||||
this.connectRelay(relayUrl)
|
this.connectRelay(relayUrl)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -263,11 +258,9 @@ export class RelayController {
|
|||||||
event: Event,
|
event: Event,
|
||||||
relayUrls: string[] = []
|
relayUrls: string[] = []
|
||||||
): Promise<string[]> => {
|
): Promise<string[]> => {
|
||||||
// add app relay to relays array
|
// Add app relay to relays array and connect to all specified relays
|
||||||
relayUrls.push(SIGIT_RELAY)
|
|
||||||
|
|
||||||
// Connect to all specified relays
|
const relayPromises = [...relayUrls, SIGIT_RELAY].map((relayUrl) =>
|
||||||
const relayPromises = relayUrls.map((relayUrl) =>
|
|
||||||
this.connectRelay(relayUrl)
|
this.connectRelay(relayUrl)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user