brave / brave-ios

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

Restoring the same wallet a few times doesn't restore all NFTs in one go #8744

Open srirambv opened 4 months ago

srirambv commented 4 months ago

Description:

Restoring the same wallet a few times doesn't restore all NFTs in one go

Steps to Reproduce

  1. Restore wallet with NFTs
  2. Go to NFT tab and enable auto-discovery
  3. Ensure all NFTs are restored
  4. Reset wallet and restore same wallet from step 1
  5. Go to NFT tab and wait for auto discovery
  6. Only few NFTs are restored
  7. Lock and unlock or close and open wallet triggering fetch
  8. May or may not restore all NFT. Need to repeat step 7 until all of them are restored

Actual result:

Restoring the same wallet a few times doesn't restore all NFTs in one go

Expected result:

Should restore all NFTs every time the wallet is restored

Reproduces how often: [Easily reproduced, Intermittent Issue]

Easy

Brave Version:

Device details:

All

Website problems only:

Additional Information

cc: @nuo-xu @StephenHeaps

nuo-xu commented 4 months ago

@nvonpentz i did some tests. I think this could be related to https://github.com/brave/brave-browser/issues/35697. However, this time, we can trigger asset discovery by calling WalletService.discoverAssetsOnAllSupportedChains but core only returns some assets not all assets via WalletService.onDiscoverAssetsCompleted callback.