Skip to content

Commit 82d4924

Browse files
committed
rename
1 parent a2fbc6b commit 82d4924

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/utils/math.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getPercentile = (arr: number[], percentile: number): number => {
88
return arr[index];
99
};
1010

11-
export const bigMath = {
11+
export const BigIntMath = {
1212
min: (a: bigint, b: bigint) => (a < b ? a : b),
1313
max: (a: bigint, b: bigint) => (a > b ? a : b),
1414
};

src/worker/tasks/sendTransactionWorker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
isReplacementGasFeeTooLow,
4040
wrapError,
4141
} from "../../utils/error";
42-
import { bigMath } from "../../utils/math";
42+
import { BigIntMath } from "../../utils/math";
4343
import { getChecksumAddress } from "../../utils/primitiveTypes";
4444
import { recordMetrics } from "../../utils/prometheus";
4545
import { redis } from "../../utils/redis/redis";
@@ -575,7 +575,7 @@ export function _updateGasFees(
575575
return populatedTransaction;
576576
}
577577

578-
const multiplier = bigMath.min(10n, BigInt(resendCount) * 2n);
578+
const multiplier = BigIntMath.min(10n, BigInt(resendCount) * 2n);
579579
const updated = { ...populatedTransaction };
580580

581581
// Update gas fees (unless they were explicitly overridden).
@@ -584,15 +584,15 @@ export function _updateGasFees(
584584

585585
if (updated.gasPrice && !overrides?.gasPrice) {
586586
const newGasPrice = updated.gasPrice * multiplier;
587-
updated.gasPrice = bigMath.min(newGasPrice, MAX_GAS_PRICE_WEI);
587+
updated.gasPrice = BigIntMath.min(newGasPrice, MAX_GAS_PRICE_WEI);
588588
}
589589
if (updated.maxPriorityFeePerGas && !overrides?.maxPriorityFeePerGas) {
590590
updated.maxPriorityFeePerGas *= multiplier;
591591
}
592592
if (updated.maxFeePerGas && !overrides?.maxFeePerGas) {
593593
const newMaxFeePerGas =
594594
updated.maxFeePerGas * 2n + (updated.maxPriorityFeePerGas ?? 0n);
595-
updated.maxFeePerGas = bigMath.min(newMaxFeePerGas, MAX_GAS_PRICE_WEI);
595+
updated.maxFeePerGas = BigIntMath.min(newMaxFeePerGas, MAX_GAS_PRICE_WEI);
596596
}
597597

598598
return updated;

0 commit comments

Comments
 (0)