websocket testnet url fix
This commit is contained in:
parent
b5a8a5dc24
commit
ce56c1b03b
@ -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),
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user