Skip to content

Commit

Permalink
chore(wallet)_: unused getBaseFee function removed from fee manager
Browse files Browse the repository at this point in the history
  • Loading branch information
saledjenic committed Jan 17, 2025
1 parent 90f4740 commit bb7b1f2
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions services/wallet/router/fees/fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import (
"math/big"

"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/params"
"github.com/status-im/status-go/errors"
"github.com/status-im/status-go/rpc"
"github.com/status-im/status-go/rpc/chain"
"github.com/status-im/status-go/services/wallet/common"
)

Expand Down Expand Up @@ -135,21 +132,3 @@ func (f *FeeManager) SuggestedFeesGwei(ctx context.Context, chainID uint64) (*Su
EIP1559Enabled: fees.EIP1559Enabled,
}, nil
}

func (f *FeeManager) getBaseFee(ctx context.Context, client chain.ClientInterface) (*big.Int, error) {
header, err := client.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
}

chainID := client.NetworkID()
config := params.MainnetChainConfig
switch chainID {
case common.EthereumSepolia,
common.OptimismSepolia,
common.ArbitrumSepolia:
config = params.SepoliaChainConfig
}
baseFee := misc.CalcBaseFee(config, header)
return baseFee, nil
}

0 comments on commit bb7b1f2

Please sign in to comment.