lily-wallet
lily-wallet copied to clipboard
transactions pagination
Hi, I see blockstream rteturns a max of 50 txs per addrress. Is pagination already implemented in the code or you only show the last 50 transactions?
Thanks
I don't do anything with pagination at the moment but most addresses only have two transactions: one incoming and one outgoing.
I see. I guess it could be a problem for xpubs used for DCA. Imagine stacking sats every 3 days, in that case it would be easy to reach the limit of 50 transactions.
From my understanding, it is 50 txs per address. Wallets that follow best practices don't reuse addresses, so when the user goes to the receive page, they are always given a fresh address with zero transactions associated with it.
In your example with DCA, unless there is auto withdraw to a specific address (I believe Swan does this) then yes I can see it hitting that limit but I don't think many folks do that. The 50 tx limit could also be hit if the user posted a static address somewhere (like a donation page) and had 50 people send money to it.
You're right though, for those weird edge cases, we should add logic in the tx fetching call to see if the response is 50 and if it is then making another request with the pagination value.
yeah it's probably just an edge case. You are right.