Skip to content

Commit

Permalink
add btc chain id to get tss address cli
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Jan 15, 2024
1 parent 6dc68a5 commit 72dfe6b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions x/observer/client/cli/query_get_tss_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ import (

func CmdGetTssAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "get-tss-address",
Use: "get-tss-address [bitcoinChainId]]",
Short: "Query current tss address",
Args: cobra.NoArgs,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {

clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

params := &types.QueryGetTssAddressRequest{}
if len(args) == 1 {
bitcoinChainId, err := strconv.ParseInt(args[0], 10, 64)
if err != nil {
return err
}
params.BitcoinChainId = bitcoinChainId
}

res, err := queryClient.GetTssAddress(cmd.Context(), params)
if err != nil {
Expand Down

0 comments on commit 72dfe6b

Please sign in to comment.