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