Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cherry pick hotfix v12.2.5 #1727

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* [1690](https://github.com/zeta-chain/node/issues/1690) - double watched gas prices and fix btc scheduler
* [1687](https://github.com/zeta-chain/node/pull/1687) - only use EVM supported chains for gas stability pool
* [1692](https://github.com/zeta-chain/node/pull/1692) - fix get params query for emissions module
* [1721](https://github.com/zeta-chain/node/issues/1721) - zetaclient should provide bitcoin_chain_id when querying TSS address

### Tests

Expand Down
2 changes: 1 addition & 1 deletion zetaclient/bitcoin_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ func GetBtcEvent(
return nil, err
}
if wpkhAddress.EncodeAddress() != targetAddress {
return nil, err
return nil, nil
lumtis marked this conversation as resolved.
Show resolved Hide resolved
}
// deposit amount has to be no less than the minimum depositor fee
if out.Value < BtcDepositorFeeMin {
Expand Down
4 changes: 2 additions & 2 deletions zetaclient/inbound_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (ob *BitcoinChainClient) CheckReceiptForBtcTxHash(txHash string, vote bool)
if err != nil {
return "", err
}
tss, err := ob.zetaClient.GetBtcTssAddress()
tss, err := ob.zetaClient.GetBtcTssAddress(ob.chain.ChainId)
if err != nil {
return "", err
}
Expand All @@ -116,7 +116,7 @@ func (ob *BitcoinChainClient) CheckReceiptForBtcTxHash(txHash string, vote bool)
if err != nil {
ob.logger.WatchInTx.Error().Err(err).Msg("error posting to zeta core")
return "", err
} else if ballot == "" {
} else if zetaHash != "" {
ob.logger.WatchInTx.Info().Msgf("BTC deposit detected and reported: PostVoteInbound zeta tx: %s ballot %s", zetaHash, ballot)
}
return msg.Digest(), nil
Expand Down
2 changes: 1 addition & 1 deletion zetaclient/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type ZetaCoreBridger interface {
GetCrosschainFlags() (observertypes.CrosschainFlags, error)
GetObserverList() ([]string, error)
GetKeyGen() (*observertypes.Keygen, error)
GetBtcTssAddress() (string, error)
GetBtcTssAddress(chainID int64) (string, error)
GetInboundTrackersForChain(chainID int64) ([]crosschaintypes.InTxTracker, error)
GetLogger() *zerolog.Logger
ZetaChain() common.Chain
Expand Down
6 changes: 4 additions & 2 deletions zetaclient/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ func (b *ZetaCoreBridge) GetEthTssAddress() (string, error) {
return resp.Eth, nil
}

func (b *ZetaCoreBridge) GetBtcTssAddress() (string, error) {
func (b *ZetaCoreBridge) GetBtcTssAddress(chainID int64) (string, error) {
client := observertypes.NewQueryClient(b.grpcConn)
resp, err := client.GetTssAddress(context.Background(), &observertypes.QueryGetTssAddressRequest{})
resp, err := client.GetTssAddress(context.Background(), &observertypes.QueryGetTssAddressRequest{
BitcoinChainId: chainID,
})
if err != nil {
return "", err
}
Expand Down
Loading