-
Notifications
You must be signed in to change notification settings - Fork 5k
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
add websocket methods #6479
add websocket methods #6479
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6479 +/- ##
==========================================
+ Coverage 87.37% 89.66% +2.29%
==========================================
Files 197 214 +17
Lines 7548 8208 +660
Branches 2059 2220 +161
==========================================
+ Hits 6595 7360 +765
+ Misses 953 848 -105
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
as discussed in team call, for manual disconnect function call:
1- add an optional flag argument
2- based on that flag if data queue is not empty set interval and keep on checking until data queue is empty, when empty call disconnect and clear interval.
Deploying with Cloudflare Pages
|
This reverts commit c80e256.
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.
Thanks @luu-alex,
I just have 2 small points at CHAINGLOG.md file.
packages/web3-utils/CHANGELOG.md
Outdated
### Fixed | ||
|
||
- Add `isContractInitOptions` method (#6455) |
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 think this should be still under Added
section. But I noticed that the PR number was wrong (was 6455 but should be 6555), right?
### Fixed | |
- Add `isContractInitOptions` method (#6455) | |
- Add `isContractInitOptions` method (#6555) | |
### Fixed |
packages/web3-utils/CHANGELOG.md
Outdated
- Added `safeDisconnect` as a `SocketProvider` method to disconnect only when request queue size and send request queue size is 0 (#6451) |
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.
We need the PR number rather than the issue number.
- `SocketProvider` now contains public function `getPendingRequestQueueSize`, `getSentRequestsQueueSize` and `clearQueues` (#6451) | |
- Added `safeDisconnect` as a `SocketProvider` method to disconnect only when request queue size and send request queue size is 0 (#6451) | |
- `SocketProvider` now contains public function `getPendingRequestQueueSize`, `getSentRequestsQueueSize` and `clearQueues` (#6479) | |
- Added `safeDisconnect` as a `SocketProvider` method to disconnect only when request queue size and send request queue size is 0 (#6479) |
} catch(error) { | ||
// if it errors, fail test | ||
// eslint-disable-next-line | ||
expect(true).toBe(false) |
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.
pls use some standard way of checking like,
expect(myAsyncFunction()).resolves.not.toThrow()
expect(myAsyncFunction()).resolves.not.toThrowError();
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.
PR LGTM, except above change. thanks |
|
Description
#6451
SocketProvider
now contains public functiongetPendingRequestQueueSize
,getSentRequestsQueueSize
(WebSocketProvider.disconnect()
should have an option to wait until_pendingRequestsQueue
/_sentRequestsQueue
are empty #6451)safeDisconnect
as aSocketProvider
method to disconnect only when request queue size and send request queue size is 0 (WebSocketProvider.disconnect()
should have an option to wait until_pendingRequestsQueue
/_sentRequestsQueue
are empty #6451)Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change
Checklist:
npm run lint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:coverage
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.