Skip to content

Commit

Permalink
add btc chain id to get tss address historical cli
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Jan 16, 2024
1 parent 72dfe6b commit cbe3499
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions x/observer/client/cli/query_get_tss_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit cbe3499

Please sign in to comment.