mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-19 17:23:19 +00:00
Fix testnet connections
This commit is contained in:
@ -114,10 +114,11 @@ const EncryptedSocketChat: React.FC<Props> = ({
|
|||||||
if (!slot?.token) return;
|
if (!slot?.token) return;
|
||||||
|
|
||||||
const url = federation.getCoordinator(order.shortAlias).url;
|
const url = federation.getCoordinator(order.shortAlias).url;
|
||||||
|
const protocol = url.includes('https') ? 'wss://' : 'ws://';
|
||||||
|
|
||||||
websocketClient
|
websocketClient
|
||||||
.open(
|
.open(
|
||||||
`${url.replace(/^https?:\/\//, 'ws://')}/ws/chat/${
|
`${url.replace(/^https?:\/\//, protocol)}/ws/chat/${
|
||||||
order.id
|
order.id
|
||||||
}/?token_sha256_hex=${sha256(slot?.token)}`,
|
}/?token_sha256_hex=${sha256(slot?.token)}`,
|
||||||
)
|
)
|
||||||
|
@ -59,12 +59,13 @@ export const SuccessfulPrompt = ({
|
|||||||
const coordinatorPubKey = federation.getCoordinator(order.shortAlias)?.nostrHexPubkey;
|
const coordinatorPubKey = federation.getCoordinator(order.shortAlias)?.nostrHexPubkey;
|
||||||
|
|
||||||
if (!coordinatorToken) {
|
if (!coordinatorToken) {
|
||||||
|
console.error('Missing coordinator token');
|
||||||
setTokenError(true);
|
setTokenError(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!slot?.nostrPubKey || !slot.nostrSecKey || !coordinatorPubKey || !order.id) {
|
if (!slot?.nostrPubKey || !slot.nostrSecKey || !coordinatorPubKey || !order.id) {
|
||||||
setHostRating(0);
|
console.error('Rating not valid');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ class RoboPool {
|
|||||||
|
|
||||||
const requestRatings = [
|
const requestRatings = [
|
||||||
'REQ',
|
'REQ',
|
||||||
`subscribeRatings${id}`,
|
`subscribeRatings${id ?? ''}`,
|
||||||
{ kinds: [31986], '#p': pubkeys ?? defaultPubkeys, since: 1746316800 },
|
{ kinds: [31986], '#p': pubkeys ?? defaultPubkeys, since: 1746316800 },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user