Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 990eaa6

Browse files
authored
Fix filtering logic for networks with legacy transactions (#199)
1 parent 2423216 commit 990eaa6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/modules/gasprice/filter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package gasprice
33
import (
44
"math/big"
55

6+
"github.com/ethereum/go-ethereum/common"
67
"github.com/stackup-wallet/stackup-bundler/pkg/modules"
78
"github.com/stackup-wallet/stackup-bundler/pkg/userop"
89
)
@@ -13,7 +14,7 @@ func FilterUnderpriced() modules.BatchHandlerFunc {
1314
return func(ctx *modules.BatchHandlerCtx) error {
1415
b := []*userop.UserOperation{}
1516
for _, op := range ctx.Batch {
16-
if ctx.BaseFee != nil && ctx.Tip != nil {
17+
if ctx.BaseFee != nil && ctx.BaseFee.Cmp(common.Big0) != 0 && ctx.Tip != nil {
1718
gp := big.NewInt(0).Add(ctx.BaseFee, ctx.Tip)
1819
if op.GetDynamicGasPrice(ctx.BaseFee).Cmp(gp) >= 0 {
1920
b = append(b, op)

0 commit comments

Comments
 (0)