Fix limited Cryptokitties display and order #9810
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #6839
Summary
Beforehand a limited amount of 20 kitties would appear in the status wallet, I investigated to find that the Cryptokitties API is only limited to 20 collectables per call, which explains why the limited amount was appearing in one's wallet. A parameter of the collectables by wallet call is providing an
offset
to index items for an individual wallet, so I simply created arange
that extended from zero to the number of cats in a said wallet, incrementing by 20. This was then mapped so that it could be fed intohttp-get-n
. Where each individual response was pushed to a sorted array, to finally be loaded simultaneously with one call toload-kitties
when all of the ids were obtained.Unfortunately maintaining an array's order whilst leveraging
mapv
is not possible, I did find thatfilterv
work effectively in this department but not when applied tohttp-get-n
, it resulted in the following error:Functional
Non-functional
Steps to test
status: WIP