-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #914 from oraichain/develop
Develop
- Loading branch information
Showing
15 changed files
with
545 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
diff --git a/node_modules/@cosmjs/stargate/build/modules/gov/queries.d.ts b/node_modules/@cosmjs/stargate/build/modules/gov/queries.d.ts | ||
index 98a8f14..4f400b5 100644 | ||
--- a/node_modules/@cosmjs/stargate/build/modules/gov/queries.d.ts | ||
+++ b/node_modules/@cosmjs/stargate/build/modules/gov/queries.d.ts | ||
@@ -8,7 +8,7 @@ export type GovProposalId = string | number | Long | Uint64; | ||
export interface GovExtension { | ||
readonly gov: { | ||
readonly params: (parametersType: GovParamsType) => Promise<QueryParamsResponse>; | ||
- readonly proposals: (proposalStatus: ProposalStatus, depositor: string, voter: string, paginationKey?: Uint8Array) => Promise<QueryProposalsResponse>; | ||
+ readonly proposals: (proposalStatus: ProposalStatus, depositor: string, voter: string, paginationKey?: Uint8Array, offset?: number, limit?: number) => Promise<QueryProposalsResponse>; | ||
readonly proposal: (proposalId: GovProposalId) => Promise<QueryProposalResponse>; | ||
readonly deposits: (proposalId: GovProposalId, paginationKey?: Uint8Array) => Promise<QueryDepositsResponse>; | ||
readonly deposit: (proposalId: GovProposalId, depositorAddress: string) => Promise<QueryDepositResponse>; | ||
diff --git a/node_modules/@cosmjs/stargate/build/modules/gov/queries.js b/node_modules/@cosmjs/stargate/build/modules/gov/queries.js | ||
index 7368eb3..50d8cf8 100644 | ||
--- a/node_modules/@cosmjs/stargate/build/modules/gov/queries.js | ||
+++ b/node_modules/@cosmjs/stargate/build/modules/gov/queries.js | ||
@@ -14,12 +14,12 @@ function setupGovExtension(base) { | ||
const response = await queryService.Params({ paramsType: parametersType }); | ||
return response; | ||
}, | ||
- proposals: async (proposalStatus, depositorAddress, voterAddress, paginationKey) => { | ||
+ proposals: async (proposalStatus, depositorAddress, voterAddress, paginationKey, offset, limit) => { | ||
const response = await queryService.Proposals({ | ||
proposalStatus, | ||
depositor: depositorAddress, | ||
voter: voterAddress, | ||
- pagination: (0, queryclient_1.createPagination)(paginationKey), | ||
+ pagination: (0, queryclient_1.createPagination)(paginationKey,offset, limit), | ||
}); | ||
return response; | ||
}, | ||
diff --git a/node_modules/@cosmjs/stargate/build/queryclient/utils.d.ts b/node_modules/@cosmjs/stargate/build/queryclient/utils.d.ts | ||
index 5317078..3359cc9 100644 | ||
--- a/node_modules/@cosmjs/stargate/build/queryclient/utils.d.ts | ||
+++ b/node_modules/@cosmjs/stargate/build/queryclient/utils.d.ts | ||
@@ -15,7 +15,7 @@ export declare function toAccAddress(address: string): Uint8Array; | ||
* Use this with a query response's pagination next key to | ||
* request the next page. | ||
*/ | ||
-export declare function createPagination(paginationKey?: Uint8Array): PageRequest | undefined; | ||
+export declare function createPagination(paginationKey?: Uint8Array, limit?: number, offset?: number): PageRequest | undefined; | ||
export interface ProtobufRpcClient { | ||
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>; | ||
} | ||
diff --git a/node_modules/@cosmjs/stargate/build/queryclient/utils.js b/node_modules/@cosmjs/stargate/build/queryclient/utils.js | ||
index 6f4ecaa..bf5327a 100644 | ||
--- a/node_modules/@cosmjs/stargate/build/queryclient/utils.js | ||
+++ b/node_modules/@cosmjs/stargate/build/queryclient/utils.js | ||
@@ -24,8 +24,8 @@ exports.toAccAddress = toAccAddress; | ||
* Use this with a query response's pagination next key to | ||
* request the next page. | ||
*/ | ||
-function createPagination(paginationKey) { | ||
- return paginationKey ? pagination_1.PageRequest.fromPartial({ key: paginationKey }) : undefined; | ||
+function createPagination(paginationKey, offset = 0, limit= undefined) { | ||
+ return offset ? pagination_1.PageRequest.fromPartial({ offset, reverse: true, limit }) : pagination_1.PageRequest.fromPartial({ limit, reverse: true, count_total: true }); | ||
} | ||
exports.createPagination = createPagination; | ||
function createProtobufRpcClient(base) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.