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 limited Cryptokitties display and order #9810

Closed
wants to merge 1 commit into from
Closed

Fix limited Cryptokitties display and order #9810

wants to merge 1 commit into from

Conversation

deomaius
Copy link

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 a range 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 into http-get-n. Where each individual response was pushed to a sorted array, to finally be loaded simultaneously with one call to load-kitties when all of the ids were obtained.

Unfortunately maintaining an array's order whilst leveraging mapv is not possible, I did find that filterv work effectively in this department but not when applied to http-get-n, it resulted in the following error:

TypeError: cb is not a function. (In 'cb(value)', 'cb' is "TypeError: Network request failed")
Functional
  • 1-1 chats
  • public chats
  • group chats
  • wallet / transactions
  • dapps / app browsing
  • account recovery
  • new account
  • user profile updates
  • networks
  • mailservers
  • fleet
  • bootnodes
Non-functional
  • battery performance
  • CPU performance / speed of the app
  • network consumption

Steps to test

  • Open status application
  • Navigate to the wallet tab
  • Expand a wallet with more than 20 Cryptokitties
  • Expand the collectables tab and Select Cryptokitties
  • Enjoy the sight of accurate balances

status: WIP

@deomaius deomaius requested a review from a team as a code owner January 13, 2020 14:10
@auto-assign auto-assign bot removed the request for review from a team January 13, 2020 14:10
@ghost
Copy link

ghost commented Jan 13, 2020

Hey @SamGos, and thank you so much for making your first pull request in status-react! ❤️ Please help us make your experience better by filling out this brief questionnaire https://goo.gl/forms/uWqNcVpVz7OIopXg2

@ghost
Copy link

ghost commented Jan 13, 2020

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-im-auto
Copy link
Member

status-im-auto commented Jan 13, 2020

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
6e24423 #1 2020-01-13 14:50:46 ~3 min ios 📄log
6e24423 #1 2020-01-13 14:51:00 ~3 min android 📄log
6e24423 #1 2020-01-13 14:53:42 ~6 min android-e2e 📄log

@flexsurfer
Copy link
Member

#9968

@flexsurfer flexsurfer closed this Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

A limit of 20 CryptoKitties is displayed in the collectibles list in the wallet with incorrect order
3 participants