Update Query Members

This commit is contained in:
Serkan Reis 2023-03-19 21:10:11 +03:00
parent 4bde7c8ed6
commit 625411d0c6
3 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ export const Splits = (client: SigningCosmWasmClient, txSigner: string): SplitsC
///QUERY
const listMembers = async (startAfter?: string, limit?: number): Promise<string[]> => {
return client.queryContractSmart(contractAddress, {
list_members: { limit, start_after: startAfter },
list_members: { start_after: startAfter ? startAfter : undefined, limit },
})
}

View File

@ -21,8 +21,8 @@ export interface DispatchQueryProps {
messages: SplitsInstance | undefined
type: QueryType
address: string
startAfter: string
limit: number
startAfter?: string
limit?: number
}
export const dispatchQuery = (props: DispatchQueryProps) => {

View File

@ -77,8 +77,8 @@ const SplitsQueryPage: NextPage = () => {
messages,
type,
address: resolvedAddress,
startAfter,
limit,
startAfter: startAfter.length > 0 ? startAfter : undefined,
limit: limit > 0 ? limit : undefined,
})
return result
})