Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resetting skip variable when loading pools from Balancer API
The skip value is used in two ways: To keep track of where in the cache the frontend has loaded up to when repeatedly loading from the cache, or to track where in the API it's up to if loading from the API. There was a bug where when reading from the API it would call the read from cache at the end and this would reset the skip variable to the end of the cache instead of the end of the API list. This meant that when returning a filtered list of items from the API it would request say 1000 items, but only get 90 (because of the filter), then it would set set the skip for next time to 1000 (the total requested) when the skip should have actually been 90. This fixes that bug by only resetting the skip variable to the requested skip amount when fetching from the cache. It keeps the skip set to the total retrieved from the API when results have come from the API.
- Loading branch information