Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
f642af8c
Commit
f642af8c
authored
Nov 02, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
construct api socket url
parent
7e2bcd1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Socket.ts
lib/socket/Socket.ts
+2
-2
No files found.
lib/socket/Socket.ts
View file @
f642af8c
import
type
{
SocketData
,
SocketChannelSubscriber
}
from
'
lib/socket/types
'
;
import
type
{
SocketData
,
SocketChannelSubscriber
}
from
'
lib/socket/types
'
;
import
appConfig
from
'
configs/app/config
'
;
import
{
SECOND
}
from
'
lib/consts
'
;
import
{
SECOND
}
from
'
lib/consts
'
;
interface
InitParams
{
interface
InitParams
{
...
@@ -21,8 +22,7 @@ class Socket {
...
@@ -21,8 +22,7 @@ class Socket {
return
this
;
return
this
;
}
}
// todo_tom pass host and base path from config
this
.
socket
=
new
WebSocket
(
`
${
appConfig
.
api
.
socket
}${
appConfig
.
api
.
basePath
}
/socket/v2/websocket?vsn=2.0.0`
);
this
.
socket
=
new
WebSocket
(
'
wss://blockscout.com/poa/core/socket/v2/websocket?vsn=2.0.0
'
);
this
.
socket
.
addEventListener
(
'
open
'
,
(
event
:
Event
)
=>
{
this
.
socket
.
addEventListener
(
'
open
'
,
(
event
:
Event
)
=>
{
this
.
startHeartBeat
();
this
.
startHeartBeat
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment