Skip to content

Commit

Permalink
chore: pagination key fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Aug 8, 2023
1 parent 7d1bafc commit 48ad0a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/sdk-ts/src/utils/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ export const generatePagination = (
}

export const paginationUint8ArrayToString = (key: any) => {
if (!key) {
return ''
}

if (key.constructor !== Uint8Array) {
return key as string
}

return new TextDecoder().decode(key)
return Buffer.from(key).toString('base64')
}

export const pageResponseToPagination = ({
Expand Down

0 comments on commit 48ad0a5

Please sign in to comment.