Skip to content

Commit 7017471

Browse files
authored
re-added the gas check as checkout needs this check (#436)
1 parent e544785 commit 7017471

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/worker/tasks/retryTx.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ export const retryTx = async () => {
4949
}
5050

5151
const gasOverrides = await getGasSettingsForRetry(tx, provider);
52-
// if (
53-
// gasOverrides.maxFeePerGas?.gt(config.maxFeePerGasForRetries) ||
54-
// gasOverrides.maxPriorityFeePerGas?.gt(
55-
// config.maxPriorityFeePerGasForRetries,
56-
// )
57-
// ) {
58-
// // Return if gas settings exceed configured limits. Try again later.
59-
// logger({
60-
// service: "worker",
61-
// level: "warn",
62-
// queueId: tx.id,
63-
// message: `${tx.chainId} chain gas price is higher than maximum threshold.`,
64-
// });
65-
// return;
66-
// }
52+
if (
53+
gasOverrides.maxFeePerGas?.gt(config.maxFeePerGasForRetries) ||
54+
gasOverrides.maxPriorityFeePerGas?.gt(
55+
config.maxPriorityFeePerGasForRetries,
56+
)
57+
) {
58+
// Return if gas settings exceed configured limits. Try again later.
59+
logger({
60+
service: "worker",
61+
level: "warn",
62+
queueId: tx.id,
63+
message: `${tx.chainId} chain gas price is higher than maximum threshold MaxFeePerGas: ${config.maxFeePerGasForRetries}, MaxPriorityFeePerGas: ${config.maxPriorityFeePerGasForRetries}`,
64+
});
65+
return;
66+
}
6767

6868
logger({
6969
service: "worker",

0 commit comments

Comments
 (0)