Commit f642af8c authored by tom's avatar tom

construct api socket url

parent 7e2bcd1c
import type { SocketData, SocketChannelSubscriber } from 'lib/socket/types';
import appConfig from 'configs/app/config';
import { SECOND } from 'lib/consts';
interface InitParams {
......@@ -21,8 +22,7 @@ class Socket {
return this;
}
// todo_tom pass host and base path from config
this.socket = new WebSocket('wss://blockscout.com/poa/core/socket/v2/websocket?vsn=2.0.0');
this.socket = new WebSocket(`${ appConfig.api.socket }${ appConfig.api.basePath }/socket/v2/websocket?vsn=2.0.0`);
this.socket.addEventListener('open', (event: Event) => {
this.startHeartBeat();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment