You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: