blockfrost / blockfrost-haskell

Haskell SDK for Blockfrost.io
Apache License 2.0
28 stars 21 forks source link

`allPages` returns pages in the reverse order. #26

Closed Unisay closed 2 years ago

Unisay commented 2 years ago

Given a chain of blocks 1 .. 10 and a page size of 3

I expect allPages to return the following results: [1,2,3,4,5,6,7,8,9,10]

Actual results are different: [10,7,8,9,4,5,6,1,2,3]

The next page is prepended, not appended. https://github.com/blockfrost/blockfrost-haskell/blob/a958583641372ac60318bd5d60249953175b7f29/blockfrost-client-core/src/Blockfrost/Client/Pagination.hs#L44

sorki commented 2 years ago

Thank you!