Fix market trade history
The existing logic was:
- fetch first 25 entries from get_recent_trades
- append 1000 entries from get_trade_history every 3 seconds
Issues with that:
- the last entry from get_recent_trades is few minutes ago, the first entry of get_trade_history is 7 hours ago so there is a big gap between them
- the logic that appends was actually prepending... hence after few seconds the Trade History table goes out of date
- there was no logic to check if the start date passed to get_trade_history was the same and every time the code was appending 1000 items to the array
- even if those 1000 items were the same as the previous 1000....
Fix: I replaced all that with simply fetching first 1000 entries from get_recent_trades and don't bother with get_trade_history as I don't think 7hrs ago is any helpful here, 1000 entries was enough to show up to 5hrs ago and that made a lot of pages...
Video capture (things are happening more frequently at around 00:35): https://share.getcloudapp.com/Jruo9vyO