Skip to content

Commit 3a7eef3

Browse files
committed
fix(userop): correct max gas fee calculations for chainId 137 to use userOp values instead of global variables
1 parent e0380e7 commit 3a7eef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/userop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ func SendUserOperation(userOp *userop.UserOperation, chainId int64) (string, str
284284
} else if chainId == 137 {
285285
// increase maxFeePerGas and maxPriorityFeePerGas by 50%
286286
userOp.MaxFeePerGas = new(big.Int).Div(
287-
new(big.Int).Mul(maxFeePerGas, big.NewInt(150)),
287+
new(big.Int).Mul(userOp.MaxFeePerGas, big.NewInt(150)),
288288
big.NewInt(100),
289289
)
290290
userOp.MaxPriorityFeePerGas = new(big.Int).Div(
291-
new(big.Int).Mul(maxPriorityFeePerGas, big.NewInt(150)),
291+
new(big.Int).Mul(userOp.MaxPriorityFeePerGas, big.NewInt(150)),
292292
big.NewInt(100),
293293
)
294294
} else {

0 commit comments

Comments
 (0)