Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
fix cli
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Sep 14, 2023
1 parent 905b685 commit 7d49548
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 60 deletions.
6 changes: 5 additions & 1 deletion docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50733,7 +50733,7 @@ paths:
additionalProperties: {}
tags:
- Query
/mycel-domain/mycel/resolver/query_wallet_record/{domainName}/{networkName}:
/mycel-domain/mycel/resolver/query_wallet_record/{domainName}/{domainParent}/{networkName}:
get:
summary: Queries a list of QueryWalletRecord items.
operationId: MycelResolverQueryWalletRecord
Expand Down Expand Up @@ -50768,6 +50768,10 @@ paths:
in: path
required: true
type: string
- name: domainParent
in: path
required: true
type: string
- name: networkName
in: path
required: true
Expand Down
3 changes: 1 addition & 2 deletions proto/mycel/resolver/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "mycel/resolver/params.proto";
import "mycel/registry/network_name.proto";

option go_package = "github.com/mycel-domain/mycel/x/resolver/types";

Expand Down Expand Up @@ -38,7 +37,7 @@ message QueryParamsResponse {
message QueryQueryWalletRecordRequest {
string domainName = 1;
string domainParent = 2;
mycel.registry.NetworkName networkName = 3;
string networkName = 3;
}

message QueryQueryWalletRecordResponse {
Expand Down
8 changes: 5 additions & 3 deletions x/resolver/client/cli/query_query_wallet_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ var _ = strconv.Itoa(0)

func CmdQueryWalletRecord() *cobra.Command {
cmd := &cobra.Command{
Use: "query-wallet-record [domain-name] [network-name]",
Use: "query-wallet-record [domain-name] [domain-parent] [network-name]",
Short: "Query queryWalletRecord",
Args: cobra.ExactArgs(2),
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) (err error) {
reqDomainName := args[0]
reqNetworkName := args[1]
reqDomainParent := args[1]
reqNetworkName := args[2]

clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
Expand All @@ -30,6 +31,7 @@ func CmdQueryWalletRecord() *cobra.Command {
params := &types.QueryQueryWalletRecordRequest{

DomainName: reqDomainName,
DomainParent: reqDomainParent,
NetworkName: reqNetworkName,
}

Expand Down
103 changes: 58 additions & 45 deletions x/resolver/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions x/resolver/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d49548

Please sign in to comment.