web3-provider-engine
Advanced tools
Comparing version 16.0.6 to 16.0.7
@@ -9,2 +9,8 @@ # Changelog | ||
## [16.0.7] | ||
### Fixed | ||
- Properly replace vulnerable dependency `request` with patched `@cypress/request` ([#459](https://github.com/MetaMask/web3-provider-engine/pull/459)) | ||
## [16.0.6] | ||
@@ -11,0 +17,0 @@ |
@@ -27,3 +27,3 @@ "use strict"; | ||
var xhr = process.browser ? require('xhr') : require('request'); | ||
var xhr = process.browser ? require('xhr') : require('@cypress/request'); | ||
var inherits = require('util').inherits; | ||
@@ -188,3 +188,3 @@ var Subprovider = require('./subprovider.js'); | ||
/*console.log('[etherscan request]' | ||
/*console.log('[etherscan request]' | ||
+ ' method: ' + useGetMethod | ||
@@ -191,0 +191,0 @@ + ' proto: ' + proto |
"use strict"; | ||
var xhr = process.browser ? require('xhr') : require('request'); | ||
var xhr = process.browser ? require('xhr') : require('@cypress/request'); | ||
var inherits = require('util').inherits; | ||
@@ -5,0 +5,0 @@ var createPayload = require('../util/create-payload.js'); |
{ | ||
"name": "web3-provider-engine", | ||
"version": "16.0.6", | ||
"version": "16.0.7", | ||
"description": "A JavaScript library for composing Ethereum provider objects using middleware modules", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/MetaMask/web3-provider-engine", |
@@ -25,3 +25,3 @@ /* | ||
const xhr = process.browser ? require('xhr') : require('request') | ||
const xhr = process.browser ? require('xhr') : require('@cypress/request') | ||
const inherits = require('util').inherits | ||
@@ -42,3 +42,3 @@ const Subprovider = require('./subprovider.js') | ||
this.retryFailed = typeof opts.retryFailed === 'boolean' ? opts.retryFailed : true; // not built yet | ||
setInterval(this.handleRequests, this.interval, this); | ||
@@ -49,8 +49,8 @@ } | ||
if(self.requests.length == 0) return; | ||
//console.log('Handling the next ' + self.times + ' of ' + self.requests.length + ' requests'); | ||
for(var requestIndex = 0; requestIndex < self.times; requestIndex++) { | ||
var requestItem = self.requests.shift() | ||
if(typeof requestItem !== 'undefined') | ||
@@ -64,3 +64,3 @@ handlePayload(requestItem.proto, requestItem.network, requestItem.payload, requestItem.next, requestItem.end) | ||
self = this; | ||
if(this.retryFailed) | ||
@@ -73,3 +73,3 @@ requestObject.end = function(err, result){ | ||
}; | ||
this.requests.push(requestObject); | ||
@@ -197,3 +197,3 @@ } | ||
var uri = proto + '://' + network + '.etherscan.io/api?' + toQueryString({ module: module, action: action }) + '&' + toQueryString(params) | ||
xhr({ | ||
@@ -211,4 +211,4 @@ uri: uri, | ||
if (err) return end(err) | ||
/*console.log('[etherscan request]' | ||
/*console.log('[etherscan request]' | ||
+ ' method: ' + useGetMethod | ||
@@ -221,6 +221,6 @@ + ' proto: ' + proto | ||
+ ' return body: ' + body);*/ | ||
if(body.indexOf('403 - Forbidden: Access is denied.') > -1) | ||
return end('403 - Forbidden: Access is denied.') | ||
var data | ||
@@ -227,0 +227,0 @@ try { |
@@ -1,2 +0,2 @@ | ||
const xhr = process.browser ? require('xhr') : require('request') | ||
const xhr = process.browser ? require('xhr') : require('@cypress/request') | ||
const inherits = require('util').inherits | ||
@@ -3,0 +3,0 @@ const createPayload = require('../util/create-payload.js') |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2596166
3