websocket testnet url fix

This commit is contained in:
Dmitry Martynenko authored and softsimon committed 2021-12-20 23:08:13 +04:00
1 parent b5a8a5dc24
commit ce56c1b03b
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -2,9 +2,9 @@ import { WsInterface, WsInstance } from '../../interfaces/bitcoin/websockets';
import wsClient from '../../services/ws/client';
import wsServer from '../../services/ws/server';
export const useWebsocket = (hostname: string): WsInstance => {
export const useWebsocket = (hostname: string, network: string): WsInstance => {
const wsEndpoint = `wss://${hostname}/api/v1/ws`;
const wsEndpoint = `wss://${hostname}${network === 'main' ? '' : `/${network}`}/api/v1/ws`;
return {
initClient: ({ options }: WsInterface) =>
wsClient(options, wsEndpoint),
+1 -1
View File
@@ -52,7 +52,7 @@ const mempool = (
fees: useFees(apiBitcoin),
mempool: useMempool(apiBitcoin),
transactions: useTransactions(apiBitcoin),
websocket: useWebsocket(hostname),
websocket: useWebsocket(hostname, network),
},
bisq: {
statistics: useStatisticsBisq(apiBisq),