Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ export class GasEstimator {
throw new Error(`Bad polygon response ${json}`);

const maxFeePerGas = Number(polygonResponse.fast.maxFee) * 2;
const maxPriorityFeePerGas = Number(polygonResponse.fast.maxPriorityFee);
// Polygon requires minimum 25 gwei priority fee; enforce 30 gwei minimum for safety margin.
const maxPriorityFeePerGas = Math.max(Number(polygonResponse.fast.maxPriorityFee), 30);

if (Number.isNaN(maxFeePerGas) || Number.isNaN(maxPriorityFeePerGas)) {
throw new Error(`Bad polygon response ${json}`);
Expand Down