From 04de916cba5775a6b2bb7a4b56460e1f9f136c34 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 10 Jan 2023 14:49:03 +0100 Subject: [PATCH] fix: wallet downloader for l2 chain --- services/wallet/chain/client.go | 3 +++ services/wallet/transfer/downloader.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/services/wallet/chain/client.go b/services/wallet/chain/client.go index a5a47b346..0760f5fb6 100644 --- a/services/wallet/chain/client.go +++ b/services/wallet/chain/client.go @@ -109,6 +109,9 @@ func (cc *Client) GetBaseFeeFromBlock(blockNumber *big.Int) (string, error) { var feeHistory FeeHistory err := cc.rpcClient.Call(&feeHistory, cc.ChainID, "eth_feeHistory", "0x1", (*hexutil.Big)(blockNumber), nil) if err != nil { + if err.Error() == "the method eth_feeHistory does not exist/is not available" { + return "", nil + } return "", err } diff --git a/services/wallet/transfer/downloader.go b/services/wallet/transfer/downloader.go index e46c8ec67..c1cc14641 100644 --- a/services/wallet/transfer/downloader.go +++ b/services/wallet/transfer/downloader.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -159,6 +160,9 @@ func (d *ETHDownloader) getTransfersInBlock(ctx context.Context, blk *types.Bloc from, err := types.Sender(d.signer, tx) if err != nil { + if err == core.ErrTxTypeNotSupported { + continue + } return nil, err }