brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Fix #8482, #8519: NFT loading improvement #8551

Closed nuo-xu closed 9 months ago

nuo-xu commented 9 months ago

Summary of Changes

  1. Wallet is only fetching junk NFTs from SimpleHash when an auto-discovery assets process is completed
  2. Only display the skeleton loading when wallet is fetching junk NFTs
  3. Caching NFTs balance and metadata

This pull request fixes #8482 #8519

Submitter Checklist:

Test Plan:

Opt-in auto-discovery from NFT tab

  1. fresh install and set up a wallet has some NFTs
  2. go to wallet/portfolio/NFTs, and opt-in auto-discovery from the pop-up
  3. observe NFTs are being fetched as well as junk NFTs
  4. Other functionalities in this view should still work

Opt-in auto-discovery from settings

  1. fresh install and set up a wallet has some NFTs
  2. go wallet settings, and opt-in auto-discovery
  3. go to portfolio/NFTs
  4. observe no pop-up will show up but NFTs are being fetched as well as junk NFTs
  5. Other functionalities in this view should still work

Filter update

  1. Continue from previous
  2. Open filter in Portfolio/NFTs
  3. turn on or off Network Logo and save
  4. observe network icon will be shown or hidden respectfully with no loading state.

Screenshots:

Reviewer Checklist: