Simplify PageRequest generation

No need to set default values
This commit is contained in:
Simon Warta
2022-08-11 22:14:51 +02:00
parent 0e3f350167
commit 26557c1c20
+1 -8
View File
@@ -22,14 +22,7 @@ export function toAccAddress(address: string): Uint8Array {
* request the next page.
*/
export function createPagination(paginationKey?: Uint8Array): PageRequest | undefined {
return paginationKey
? PageRequest.fromPartial({
key: paginationKey,
offset: Long.UZERO,
limit: Long.UZERO,
countTotal: false,
})
: undefined;
return paginationKey ? PageRequest.fromPartial({ key: paginationKey }) : undefined;
}
export interface ProtobufRpcClient {