Skip to content

Commit

Permalink
add {address} argument to http
Browse files Browse the repository at this point in the history
  • Loading branch information
tqin7 committed Sep 23, 2024
1 parent 22dcc7f commit 1ee2b84
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,8 @@ export class LCDQueryClient {


async megavaultOwnerShares(params: QueryMegavaultOwnerSharesRequest): Promise<QueryMegavaultOwnerSharesResponseSDKType> {
const options: any = {
params: {}
};

if (typeof params?.address !== "undefined") {
options.params.address = params.address;
}

const endpoint = `dydxprotocol/vault/megavault/owner_shares`;
return await this.req.get<QueryMegavaultOwnerSharesResponseSDKType>(endpoint, options);
const endpoint = `dydxprotocol/vault/megavault/owner_shares/${params.address}`;
return await this.req.get<QueryMegavaultOwnerSharesResponseSDKType>(endpoint);
}
/* Queries all owner shares of megavault. */

Expand Down
3 changes: 2 additions & 1 deletion proto/dydxprotocol/vault/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ service Query {
// Queries owner shares of megavault.
rpc MegavaultOwnerShares(QueryMegavaultOwnerSharesRequest)
returns (QueryMegavaultOwnerSharesResponse) {
option (google.api.http).get = "/dydxprotocol/vault/megavault/owner_shares";
option (google.api.http).get =
"/dydxprotocol/vault/megavault/owner_shares/{address}";
}
// Queries all owner shares of megavault.
rpc MegavaultAllOwnerShares(QueryMegavaultAllOwnerSharesRequest)
Expand Down
159 changes: 80 additions & 79 deletions protocol/x/vault/types/query.pb.go

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

44 changes: 31 additions & 13 deletions protocol/x/vault/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 1ee2b84

Please sign in to comment.