-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Filtering support for my_recent_swaps #784
Comments
* WIP. Try rusqlite crate. * WIP. Try rusqlite crate. * WIP. Fix clippy. * WIP. Added SQLite DB init and migration. TODO: insert swaps data into DB. * WIP. Indexed existing swaps to SQLite on DB migration. * WIP. Insert new started swaps data to SQLite. * WIP. Added SQL selection of uuids depending on MyRecentSwapsReq. * WIP. Refactor recent swaps uuids select to named params. * Added from_uuid support for SQLite. Refactoring. Feature finished. * Remove +nightly from cargo commands. * Fixes after review. * Set page_number to 1 in my_recent_swaps response when page_number and from_uuid are not set in request.
I have implemented the filtering: the params are passed a bit differently than requested, but I think it looks a bit more straight-forward this way. The corresponding PR has been just merged, the docs update PR will be merged soon and published on the website. |
The Github release has been just published: https://github.com/KomodoPlatform/atomicDEX-API/releases/tag/beta-2.1.2978. All OS builds will be uploaded from CI quite soon. |
Is your feature request related to a problem? Please describe.
Since #780 and #781 we page pagination support ! 🎊
However it includes other problems, like filtering, indeed filtering only applies on the result of the pagination that based on the initial request
my_recent_swaps
.The problem is that if we have for example
220
swaps, with a limit of50
swaps per pages, we have 5 pages (without filtering) but if we do filtering the total number of swaps changes and the number of pages also changes. (not supported my mm2 yet)This need to be handled in mm2 side.
Describe the solution you'd like
I wish the rpc call
my_recent_swaps
could take an optional new filtering parameter.Note that
total_pages
in the answer should also change based on the filtering.Describe alternatives you've considered
Fetch all the swaps once, and then apply filtering myself, but with huge swaps history this cost too much memory and this is slow
Additional context
Maybe related to the fact that MM2 plan to move DB to smth like:
embedded DB like SQLite
, will be easier to use filtering in this caseAlso related to KomodoPlatform/komodo-wallet#621
Video: https://user-images.githubusercontent.com/21139416/103265567-32c76e80-49ae-11eb-94ce-8b39dfe27385.mov
The text was updated successfully, but these errors were encountered: