mirror of
https://github.com/RoboSats/robosats.git
synced 2025-09-13 00:56:22 +00:00
Fix relay conection
This commit is contained in:
@ -306,9 +306,9 @@ export class Coordinator {
|
|||||||
|
|
||||||
getRelayUrl = (network: 'mainnet' | 'testnet', hostUrl: string, selfHosted: boolean): string => {
|
getRelayUrl = (network: 'mainnet' | 'testnet', hostUrl: string, selfHosted: boolean): string => {
|
||||||
if (selfHosted && this.shortAlias !== 'local') {
|
if (selfHosted && this.shortAlias !== 'local') {
|
||||||
return `ws://${hostUrl.replace(/^https?:\/\//, '')}/${network}/${this.shortAlias}/relay`;
|
return `ws://${hostUrl.replace(/^https?:\/\//, '')}/${network}/${this.shortAlias}/relay/`;
|
||||||
} else {
|
} else {
|
||||||
return `ws://${this.url.replace(/^https?:\/\//, '')}/relay`;
|
return `ws://${this.url.replace(/^https?:\/\//, '')}/relay/`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class RoboPool {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (settings.host) {
|
if (settings.host) {
|
||||||
const hostNostr = `ws://${settings.host.replace(/^https?:\/\//, '')}/relay`;
|
const hostNostr = `ws://${settings.host.replace(/^https?:\/\//, '')}/relay/`;
|
||||||
if (federationRelays.includes(hostNostr)) {
|
if (federationRelays.includes(hostNostr)) {
|
||||||
this.relays.push(hostNostr);
|
this.relays.push(hostNostr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user