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 ///QUERY
const listMembers = async (startAfter?: string, limit?: number): Promise<string[]> => { const listMembers = async (startAfter?: string, limit?: number): Promise<string[]> => {
return client.queryContractSmart(contractAddress, { 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 messages: SplitsInstance | undefined
type: QueryType type: QueryType
address: string address: string
startAfter: string startAfter?: string
limit: number limit?: number
} }
export const dispatchQuery = (props: DispatchQueryProps) => { export const dispatchQuery = (props: DispatchQueryProps) => {

View File

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