This commit is contained in:
parent
9b10b29da2
commit
d5a10a97f1
|
@ -11,12 +11,12 @@ var errorNotAvailableOnChainID = errors.New("BalanceChecker not available for ch
|
|||
var contractDataByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x040EA8bFE441597849A9456182fa46D38B75BC05"), // mainnet
|
||||
10: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // optimism
|
||||
42161: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // arbitrum
|
||||
42161: common.HexToAddress("0x54764eF12d29b249fDC7FC3caDc039955A396A8e"), // arbitrum
|
||||
5: common.HexToAddress("0xA5522A3194B78Dd231b64d0ccd6deA6156DCa7C8"), // goerli
|
||||
421613: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // goerli arbitrum
|
||||
421613: common.HexToAddress("0x54764eF12d29b249fDC7FC3caDc039955A396A8e"), // goerli arbitrum
|
||||
420: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // goerli optimism
|
||||
11155111: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // sepolia
|
||||
421614: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // sepolia arbitrum
|
||||
421614: common.HexToAddress("0x54764eF12d29b249fDC7FC3caDc039955A396A8e"), // sepolia arbitrum
|
||||
11155420: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // sepolia optimism
|
||||
777333: common.HexToAddress("0x0000000000000000000000000000000010777333"), // unit tests
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import (
|
|||
"github.com/status-im/status-go/services/wallet/async"
|
||||
"github.com/status-im/status-go/services/wallet/balance"
|
||||
"github.com/status-im/status-go/services/wallet/blockchainstate"
|
||||
walletcommon "github.com/status-im/status-go/services/wallet/common"
|
||||
"github.com/status-im/status-go/services/wallet/token"
|
||||
"github.com/status-im/status-go/services/wallet/walletevent"
|
||||
"github.com/status-im/status-go/transactions"
|
||||
|
@ -72,19 +71,6 @@ func (c *findNewBlocksCommand) detectTransfers(parent context.Context, accounts
|
|||
return nil, nil, err
|
||||
}
|
||||
|
||||
networkID := c.chainClient.NetworkID()
|
||||
// TODO(rasom): remove this as soon as BalanceChecker contract for
|
||||
// Arbitrum networks will return l2 block number instead of l1
|
||||
if networkID == walletcommon.ArbitrumMainnet || networkID == walletcommon.ArbitrumGoerli || networkID == walletcommon.ArbitrumSepolia {
|
||||
header, err := c.chainClient.HeaderByNumber(context.Background(), nil)
|
||||
if err != nil {
|
||||
log.Error("findNewBlocksCommand error getting header", "error", err, "chain", c.chainClient.NetworkID())
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
blockNum = header.Number
|
||||
}
|
||||
|
||||
addressesToCheck := []common.Address{}
|
||||
for idx, account := range accounts {
|
||||
blockRange, err := c.blockRangeDAO.getBlockRange(c.chainClient.NetworkID(), account)
|
||||
|
|
Loading…
Reference in New Issue