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

Fix #6439: ensure provider.supportsSubscriptions exists before watching by subscription #6440

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/web3-eth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,6 @@ Documentation:
### Added

- Added to `Web3Config` property `contractDataInputFill` allowing users to have the choice using property `data`, `input` or `both` for contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400)

### Fixed
- Ensure provider.supportsSubscriptions exists before watching by subscription (#6440)
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function watchTransactionForConfirmations<

// so a subscription for newBlockHeaders can be made instead of polling
const provider: Web3BaseProvider = web3Context.requestManager.provider as Web3BaseProvider;
if (provider.supportsSubscriptions()) {
if (provider && 'supportsSubscriptions' in provider && provider.supportsSubscriptions()) {
watchTransactionBySubscription({
web3Context,
transactionReceipt,
Expand Down
Loading