Skip to content

Commit

Permalink
Replace old xhr2-cookies with xhr2-cookies-patched (#4808)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayanami committed Mar 18, 2022
1 parent 832271a commit f03fedf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit f03fedf

Please sign in to comment.