Skip to content

Commit

Permalink
Merge branch 'develop' into fix-out-gas-to-zeta-rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 authored Feb 8, 2024
2 parents cb5e755 + f65dc1c commit c191afb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [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
* ([1733](https://github.com/zeta-chain/node/pull/1733)) - remove the unnecessary 2x multiplier in the convertGasToZeta RPC
* [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 // irrelevant tx to us, skip
}
// 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

0 comments on commit c191afb

Please sign in to comment.