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

Replace old xhr2-cookies with xhr2-cookies-patched deps for 1.x, fix User-Agent header problem #4808

Merged
merged 2 commits into from Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,4 @@ Released with 1.0.0-beta.37 code base.

### Fixed
- Fix jsonrpc payload and response types (#4743) (#4761)

- Replaced xhr2-cookies dependency from web3-providers-http module to enable using custom `User-Agent` headers (#4808)
2 changes: 1 addition & 1 deletion packages/web3-providers-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"main": "lib/index.js",
"dependencies": {
"web3-core-helpers": "1.7.1",
"xhr2-cookies": "1.1.0"
"xhr2-cookies-patched": "1.1.0"
},
"devDependencies": {
"dtslint": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-providers-http/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

var errors = require('web3-core-helpers').errors;
var XHR2 = require('xhr2-cookies').XMLHttpRequest; // jshint ignore: line
var XHR2 = require('xhr2-cookies-patched').XMLHttpRequest; // jshint ignore: line
var http = require('http');
var https = require('https');

Expand Down
2 changes: 1 addition & 1 deletion test/httpprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var SandboxedModule = require('sandboxed-module');
SandboxedModule.registerBuiltInSourceTransformer('istanbul');
var HttpProvider = SandboxedModule.require('../packages/web3-providers-http', {
requires: {
'xhr2-cookies': require('./helpers/FakeXHR2'),
'xhr2-cookies-patched': require('./helpers/FakeXHR2'),
// 'xmlhttprequest': require('./helpers/FakeXMLHttpRequest')
},
singleOnly: true
Expand Down