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
I try to display a nice transaction history, but I cannot insert an unpaid invoice into the timeline at the correct position, as there is no information on when it was created.
Either a "created_at" timestamp is needed, or an "expiry" field has to be provided.
In the second case I could calculate the created_at by doing "expires_at" - "expiry".
@daywalker90
the correct position in regards to other invoices yes. But in my app the transaction history shows on-chain events, payments & invoices in a single timeline. Therefore I need to order it by date, not by an index that only applies to invoices.
Furthermore I always display the time for an event, which is not possible either with the created_index.
I already solved the problem by decoding the bolt11 string and extracting the timestamp from there. But the performance would be better if it was included in the api response and it would be easier for other 3rd parties to use the api.
I try to display a nice transaction history, but I cannot insert an unpaid invoice into the timeline at the correct position, as there is no information on when it was created.
Either a "created_at" timestamp is needed, or an "expiry" field has to be provided.
In the second case I could calculate the created_at by doing "expires_at" - "expiry".
Link to the docs for the enpoint that needs the change:
https://docs.corelightning.org/reference/lightning-listinvoices
The text was updated successfully, but these errors were encountered: