Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ethersproject/providers

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/providers - npm Package Compare versions

Comparing version 5.4.2 to 5.4.3

2

lib.esm/_version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "providers/5.4.2";
export declare const version = "providers/5.4.3";
//# sourceMappingURL=_version.d.ts.map

@@ -1,2 +0,2 @@

export const version = "providers/5.4.2";
export const version = "providers/5.4.3";
//# sourceMappingURL=_version.js.map

@@ -458,2 +458,19 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
// Legacy networks do not like the type field being passed along (which
// is fair), so we delete type if it is 0 and a non-EIP-1559 network
if (method === "call" || method === "estimateGas") {
const tx = params.transaction;
if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {
// If there are no EIP-1559 properties, it might be non-EIP-a559
if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {
const feeData = yield this.getFeeData();
if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {
// Network doesn't know about EIP-1559 (and hence type)
params = shallowCopy(params);
params.transaction = shallowCopy(tx);
delete params.transaction.type;
}
}
}
}
const args = this.prepareRequest(method, params);

@@ -460,0 +477,0 @@ if (args == null) {

@@ -1,2 +0,2 @@

export declare const version = "providers/5.4.2";
export declare const version = "providers/5.4.3";
//# sourceMappingURL=_version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "providers/5.4.2";
exports.version = "providers/5.4.3";
//# sourceMappingURL=_version.js.map

@@ -603,6 +603,21 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var args, error_4;
var tx, feeData, args, error_4;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(method === "call" || method === "estimateGas")) return [3 /*break*/, 2];
tx = params.transaction;
if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero())) return [3 /*break*/, 2];
if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null)) return [3 /*break*/, 2];
return [4 /*yield*/, this.getFeeData()];
case 1:
feeData = _a.sent();
if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {
// Network doesn't know about EIP-1559 (and hence type)
params = properties_1.shallowCopy(params);
params.transaction = properties_1.shallowCopy(tx);
delete params.transaction.type;
}
_a.label = 2;
case 2:
args = this.prepareRequest(method, params);

@@ -612,11 +627,11 @@ if (args == null) {

}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
_a.label = 3;
case 3:
_a.trys.push([3, 5, , 6]);
return [4 /*yield*/, this.send(args[0], args[1])];
case 2: return [2 /*return*/, _a.sent()];
case 3:
case 4: return [2 /*return*/, _a.sent()];
case 5:
error_4 = _a.sent();
return [2 /*return*/, checkError(method, error_4, params)];
case 4: return [2 /*return*/];
case 6: return [2 /*return*/];
}

@@ -623,0 +638,0 @@ });

@@ -49,3 +49,3 @@ {

],
"gitHead": "0d40156fcba5be155aa5def71bcdb95b9c11d889",
"gitHead": "68229ac0aff790b083717dc73cd84f38d32a3926",
"keywords": [

@@ -71,5 +71,5 @@ "Ethereum",

"sideEffects": false,
"tarballHash": "0xc3c1036135564a620f72f2fdb5f5722d080d30963fd5a05ab091b5fd1b57eff8",
"tarballHash": "0x9f56d24890af8f005e3de6e44f527ed98a6d975db78496543804271dc0658757",
"types": "./lib/index.d.ts",
"version": "5.4.2"
"version": "5.4.3"
}

@@ -1,1 +0,1 @@

export const version = "providers/5.4.2";
export const version = "providers/5.4.3";

@@ -1236,3 +1236,3 @@ "use strict";

["gasLimit", "gasPrice", "value"].forEach((key) => {
["gasLimit", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "value"].forEach((key) => {
if (values[key] == null) { return; }

@@ -1239,0 +1239,0 @@ tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v): null));

@@ -529,2 +529,20 @@ "use strict";

async perform(method: string, params: any): Promise<any> {
// Legacy networks do not like the type field being passed along (which
// is fair), so we delete type if it is 0 and a non-EIP-1559 network
if (method === "call" || method === "estimateGas") {
const tx = params.transaction;
if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {
// If there are no EIP-1559 properties, it might be non-EIP-a559
if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {
const feeData = await this.getFeeData();
if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {
// Network doesn't know about EIP-1559 (and hence type)
params = shallowCopy(params);
params.transaction = shallowCopy(tx);
delete params.transaction.type;
}
}
}
}
const args = this.prepareRequest(method, params);

@@ -531,0 +549,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc