Skip to content
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

Fix resetting skip variable when loading pools from Balancer API #515

Merged
merged 1 commit into from
Aug 10, 2023

Commits on Aug 9, 2023

  1. 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.
    timjrobinson committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    0f5fe95 View commit details
    Browse the repository at this point in the history