HomePhabricator

[Cashtab] Do not load ALL agora offers unless the user asks for it

Description

[Cashtab] Do not load ALL agora offers unless the user asks for it

Summary:
The Agora page is not really usable. Loading every single offer is no longer practical, with 700 offers.

It will take some time to get full searchable lazy loading for all offers, because I still need to

  • Improve ecash-agora to add better functions for analyzing offer history (getting volume)
  • Put some thought into the best ways to sort and search tokens
  • Handle loading info about all available tokens in the background somehow, bc we need this info available before a search is useful

Now that (1) the scope of the search problem is more clear and is large; and (2) the volume of agora orders is such that the page simply is not usable, we need some kind of interim solution.

For now, load a prelim whitelist. Whitelist is absolutely barebones. Only XECX and Star Crystals, the only 2 tokens that have done > $10k per day in volume.

Preserve the option to load all offers (existing behavior) so that all offers can be found somehow. But give a disclaimer that it WILL BE SLOW.

Test Plan:
npm test

check it out at https://cashtab-local-dev.netlify.app/#/agora (lots of debug logging, so you can experiment loading all and watching lazy loading, seeing the sort by offer count become enabled, confirm this still works)

hard refresh, if you are on the latest it will look like this

image.png (673×1 px, 160 KB)

Reviewers: #bitcoin_abc, johnkuney

Reviewed By: #bitcoin_abc, johnkuney

Subscribers: johnkuney

Differential Revision: https://reviews.bitcoinabc.org/D17508

Details

Provenance
bytesofmanAuthored on Fri, Jan 10, 14:42
bytesofmanPushed on Sat, Jan 11, 14:06
Reviewer
Restricted Project
Differential Revision
D17508: [Cashtab] Do not load ALL agora offers unless the user asks for it
Parents
rABCd32dcc48d1dd: [Cashtab] Make agora screen more polite
Branches
Unknown
Tags
Unknown