New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@requestnetwork/utils

Package Overview
Dependencies
Maintainers
5
Versions
694
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@requestnetwork/utils - npm Package Compare versions

Comparing version 0.39.1-next.1985 to 0.39.1-next.1986

4

dist/normalize-gas-fees.d.ts

@@ -11,5 +11,7 @@ import { BigNumber } from 'ethers';

*/
declare function normalizeGasFees({ logger, gasPriceMin, suggestFees, }: {
declare function normalizeGasFees({ logger, gasPriceMin, gasPriceMax, gasPriceMultiplier, suggestFees, }: {
logger: LogTypes.ILogger;
gasPriceMin?: BigNumber;
gasPriceMax?: BigNumber;
gasPriceMultiplier?: number;
suggestFees: () => Promise<FeeTypes.SuggestedFees>;

@@ -16,0 +18,0 @@ }): Promise<FeeTypes.EstimatedGasFees>;

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

*/
function normalizeGasFees({ logger, gasPriceMin, suggestFees, }) {
function normalizeGasFees({ logger, gasPriceMin, gasPriceMax, gasPriceMultiplier, suggestFees, }) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {

@@ -22,3 +22,9 @@ try {

const maxPriorityFeePerGas = (0, index_1.maxBigNumber)(suggestedFee.maxPriorityFee, gasPriceMin || ethers_1.constants.Zero);
const maxFeePerGas = baseFee.add(maxPriorityFeePerGas);
const maxFeePerGasInit = baseFee
.add(maxPriorityFeePerGas)
.mul(gasPriceMultiplier || 100)
.div(100);
const maxFeePerGas = gasPriceMax
? (0, index_1.minBigNumber)(maxFeePerGasInit, gasPriceMax)
: maxFeePerGasInit;
if (maxPriorityFeePerGas.eq(0) || maxFeePerGas.eq(0)) {

@@ -25,0 +31,0 @@ logger.warn(`normalizeGasFees: maxPriorityFeePerGas or maxFeePerGas too low (maxPriorityFeePerGas: ${maxPriorityFeePerGas.toString()} / maxFeePerGas: ${maxFeePerGas.toString()})`);

{
"name": "@requestnetwork/utils",
"version": "0.39.1-next.1985+8d0b3686",
"version": "0.39.1-next.1986+98997ed1",
"publishConfig": {

@@ -43,3 +43,3 @@ "access": "public"

"dependencies": {
"@requestnetwork/types": "0.39.1-next.1985+8d0b3686",
"@requestnetwork/types": "0.39.1-next.1986+98997ed1",
"@toruslabs/eccrypto": "4.0.0",

@@ -60,3 +60,3 @@ "ethers": "5.5.1",

},
"gitHead": "8d0b36867496ccc643c7caab1cb945d123ee0101"
"gitHead": "98997ed16aee7d09184c98bc88c337745d2aa928"
}

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