diff --git a/light-client-js/src/types.ts b/light-client-js/src/types.ts index e471004..a6f3a13 100644 --- a/light-client-js/src/types.ts +++ b/light-client-js/src/types.ts @@ -212,6 +212,12 @@ interface GetTransactionsResponse { } export function lightClientGetTransactionsResultTo(input: LightClientPagination | LightClientPagination): GetTransactionsResponse | GetTransactionsResponse { + if (input.objects.length === 0) { + return ({ + lastCursor: input.last_cursor, + transactions: [] + }) + } if ("io_index" in input.objects[0]) { return ({ lastCursor: input.last_cursor,