Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 588c492

Browse files
authored
Merge branch '2.x' into fix/batch-request
2 parents 57c8814 + 258acd0 commit 588c492

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6666
### Added
6767

6868
- Length check of the PK added to the ``fromPrivateKey`` method of the ``Account`` model (#2928)
69-
- Changed event added to the ``Contract`` events (#2960)
69+
- WebsocketProvider options extended with ``requestOptions`` (#2938)
70+
- ``changed`` listener added to Contract event subscriptions (#2960)
7071

7172
### Changed
7273

packages/web3-providers/src/factories/ProvidersModuleFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default class ProvidersModuleFactory {
133133
headers.authorization = `Basic ${authToken}`;
134134
}
135135

136-
connection = new W3CWebsocket(url, options.protocol, null, headers, null, options.clientConfig);
136+
connection = new W3CWebsocket(url, options.protocol, null, headers, options.requestOptions, options.clientConfig);
137137
} else {
138138
connection = new window.WebSocket(url, options.protocol);
139139
}

packages/web3-providers/tests/src/factories/ProvidersModuleFactoryTest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ describe('ProvidersModuleFactoryTest', () => {
6666
expect(
6767
providersModuleFactory.createWebsocketProvider('ws://username:password@hallo:5544', {
6868
protocol: 'string',
69-
clientConfig: 'string'
69+
clientConfig: 'string',
70+
requestOptions: null,
7071
})
7172
).toBeInstanceOf(WebsocketProvider);
7273

packages/web3-providers/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,5 @@ export interface WebsocketProviderOptions {
180180
headers?: {};
181181
protocol?: string;
182182
clientConfig?: string;
183+
requestOptions?: object
183184
}

0 commit comments

Comments
 (0)