diff --git a/common/chain.go b/common/chain.go index 0952a64b49..210a96d1f4 100644 --- a/common/chain.go +++ b/common/chain.go @@ -124,6 +124,16 @@ func IsEthereumChain(chainID int64) bool { chainID == 1337 // eth privnet } +func IsBscChain(chainID int64) bool { + return chainID == 56 || // bsc mainnet + chainID == 97 // BSC testnet +} + +func IsPolygonChain(chainID int64) bool { + return chainID == 137 || // polygon mainnet + chainID == 80001 // polygon mumbai +} + // IsEmpty is to determinate whether the chain is empty func (chain Chain) IsEmpty() bool { return strings.TrimSpace(chain.String()) == "" diff --git a/zetaclient/evm_client.go b/zetaclient/evm_client.go index ad79f68d77..311b800aef 100644 --- a/zetaclient/evm_client.go +++ b/zetaclient/evm_client.go @@ -847,7 +847,7 @@ func (ob *EVMChainClient) observeInTX() error { continue } - if ob.chain.ChainId != common.MumbaiChain().ChainId { + if !common.IsPolygonChain(ob.chain.ChainId) { _, ballotIdentifier, err := ob.zetaClient.PostAddBlockHeader( ob.chain.ChainId, block.Hash().Bytes(),