Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Offset doesn't seem to be working in the list_transactions method #588

Open
supertestnet opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@supertestnet
Copy link

supertestnet commented Aug 13, 2024

I am creating/testing an NWC client and I recently added support for list_transactions. While testing it against Alby, one of the things I tested was the "offset" parameter, which, as I understand it (based on this documentation), is supposed to do this:

Imagine a service has a tx_history with 20 transactions in it, where the "latest" was created at 1723250165, and the others were created every prior second, so that the furthest "back" in its history was created at 1723250145. If, per list_transactions query, it returns 10 transactions, and the offset is null, it should return 10 transactions with created_at numbers 1723250165---1723250155. But if I set offset: 1, it should skip the "latest" invoice, and return 10 transactions with created_at numbers 1723250164---1723250154.

To test this, I used a wallet whose latest transaction was created at 1723250250. I tested the list_transactions command with limit: 10 and offset: 0, and it returned a list of 10 transactions where 1723250250 was the "latest." This was as I expected. Then I tested it again with limit: 10 and offset: 1. But it still returned a list of 10 transactions where 1723250250 was the "latest." I suspect alby is simply ignoring the offset parameter, but perhaps I am just misunderstanding what it is supposed to do. Please look into it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant