Enable Custom Event Subscription - #6262
Conversation
+ add a test + fix 6252
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
Smaller No assets were smaller Unchanged
|
Deploying with
|
| Latest commit: |
16117e3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://daca4c18.web3-js-docs.pages.dev |
| Branch Preview URL: | https://6223-eth-subscription-manage.web3-js-docs.pages.dev |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6262 +/- ##
======================================
Coverage ? 88.71%
======================================
Files ? 198
Lines ? 7638
Branches ? 2103
======================================
Hits ? 6776
Misses ? 862
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| error: Error; | ||
| connected: number; | ||
| connected: string; | ||
| data: EventLog; |
There was a problem hiding this comment.
intersection type using existing CommonSubscriptionEvents, instead of redefining these fields?
There was a problem hiding this comment.
Sorry, this connected should be removed from here, along with error, because its related codes are in the base class. And I had done that just now.
However, regarding connected, it was not used, and there was no code related to it, in any place in this class or in the base class.
* enable custom subscription * refactor to simplify the inheritance from Web3Subscription * add `CombinedEventMap` type to `Web3Subscription` * remove unneeded casting inside `_buildSubscriptionParams` * add a test * fix "Version 4.x does not fire connected event for subscriptions. web3#6252" * update CHANGELOG.md files
* enable custom subscription * refactor to simplify the inheritance from Web3Subscription * add `CombinedEventMap` type to `Web3Subscription` * remove unneeded casting inside `_buildSubscriptionParams` * add a test * fix "Version 4.x does not fire connected event for subscriptions. web3#6252" * update CHANGELOG.md files
Description
Fixes #6223 (for this, the way to inherit from
Web3Subscriptionhas been simplified)And #6252
Type of change
Checklist:
npm run lintwith success and extended the tests and types if necessary.npm run test:unitwith success.npm run test:coverageand my test cases cover all the lines and branches of the added code.npm run buildand testeddist/web3.min.jsin a browser.CHANGELOG.mdfile in the root folder.