LN-Zap / zap-iOS

Zap Wallet - Native iOS lightning wallet focused on user experience and ease of use ⚡️
http://zaphq.io
MIT License
181 stars 47 forks source link

Implement pagination for invoices, payments, and transactions #301

Open JimmyMow opened 4 years ago

JimmyMow commented 4 years ago

Using Zap iOS with my remote node is getting really difficult. Doing something like generating an invoice takes minutes.

My assumption is because how big my remote node is. 500+ channels and thousands of invoices, payments, etc.

I think we should implement some form of pagination, as I assume my issue is generating an invoice or loading a payment is rendering a fetch of all my payments/invoices or something? Instead of loading everything, maybe we only load the last 50 and enable a scroll pagination UX that fetches more as the user wants to or something

JimmyMow commented 4 years ago

This would also solve this issue of users having timeouts when connecting to large remote nodes

ottosuess commented 4 years ago

pagination is a very hard problem 😅

  1. in the history we are combining data from multiple api endpoints (transactions, invoices, payments, channels & closedChannels). we somehow have to merge individual pages in a consolidated page 🤯, every individual page might have a different date range
  2. not all lnd api endpoints support pagination (https://github.com/lightningnetwork/lnd/pull/565)

does the desktop app have nice solution for this? @mrfelton @korhaliv