-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: multi purpose websocket client #2160
base: develop
Are you sure you want to change the base?
Conversation
Deployed to features-websocket.wallet.z52da5wt.xyz, artifacts |
32506ee
to
1267808
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After from fthe comments the code changes look good to me.
handleUnknownError(error); | ||
setTimeout(() => { | ||
this.handleWebsocketOpen(); | ||
}, WEB_SOCKET_RECONNECT_TIMEOUT); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe introduce a maximum tries check here to avoid the infinite loop when there is no internet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a code for the same goal in sdk repo https://github.com/aeternity/aepp-sdk-js/blob/develop/src/MiddlewareSubscriber.ts (already released)
Though it has own issues
NETWORK_MAINNET, | ||
} from '../popup/utils'; | ||
|
||
class WebSocketClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add middleware to the name because it is aware of it
1267808
to
5dc7e73
Compare
Deployed to features-websocket.wallet.z52da5wt.xyz, artifacts |
No description provided.