Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support setting WebSocket Base URL #434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asamere
Copy link

@asamere asamere commented Nov 8, 2022

Would be better to create an instance to manage the websocket interactions as is done for the rest client. this is gets it done on my end.

}

// failing to set the websocket base url prior to use can lead to
// interesting scenarios syncing an order bool when the rest client
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

book

@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #434 (ec20b7a) into master (c028fe5) will increase coverage by 0.04%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           master     #434      +/-   ##
==========================================
+ Coverage   69.91%   69.96%   +0.04%     
==========================================
  Files          76       76              
  Lines        7167     7171       +4     
==========================================
+ Hits         5011     5017       +6     
+ Misses       1624     1623       -1     
+ Partials      532      531       -1     
Impacted Files Coverage Δ
v2/websocket_service.go 75.59% <87.50%> (+0.79%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines +26 to 27
func init() {
if UseTestnet {
Copy link

@norunners norunners Nov 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use init with a mutable global. It's likely to run before UseTestnet is set.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @asamere , check this comment, I agree with @norunners . UseTestnet could be updated after init.

@adshao
Copy link
Owner

adshao commented Nov 21, 2022

Yes, websocket service should be done in the a client instance. Would you like to create a pull request for this improvement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants