Skip to content

Commit

Permalink
workaround to build flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Sep 29, 2023
1 parent 22371e4 commit d26b447
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions common/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()) == ""
Expand Down
2 changes: 1 addition & 1 deletion zetaclient/evm_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit d26b447

Please sign in to comment.