From cbe3499c433bb9d5973ec89af288458632be34a6 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Tue, 16 Jan 2024 15:17:55 -0500 Subject: [PATCH] add btc chain id to get tss address historical cli --- x/observer/client/cli/query_get_tss_address.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/x/observer/client/cli/query_get_tss_address.go b/x/observer/client/cli/query_get_tss_address.go index dd27528ebb..b5d8ef5a83 100644 --- a/x/observer/client/cli/query_get_tss_address.go +++ b/x/observer/client/cli/query_get_tss_address.go @@ -46,9 +46,9 @@ func CmdGetTssAddress() *cobra.Command { func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command { cmd := &cobra.Command{ - Use: "get-historical-tss-address [finalizedZetaHeight]", + Use: "get-historical-tss-address [finalizedZetaHeight] [bitcoinChainId]", Short: "Query tss address by finalized zeta height (for historical tss addresses)", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) @@ -64,6 +64,13 @@ func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command { params := &types.QueryGetTssAddressByFinalizedHeightRequest{ FinalizedZetaHeight: finalizedZetaHeight, } + if len(args) == 2 { + bitcoinChainId, err := strconv.ParseInt(args[1], 10, 64) + if err != nil { + return err + } + params.BitcoinChainId = bitcoinChainId + } res, err := queryClient.GetTssAddressByFinalizedHeight(cmd.Context(), params) if err != nil {