brave / brave-ios

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

Fix #8649: Improve Performance of Select Token to Send #8654

Closed StephenHeaps closed 8 months ago

StephenHeaps commented 8 months ago

Summary of Changes

This pull request fixes #8649

Submitter Checklist:

Test Plan:

Unfortunately I did not find consistent reproduce steps for the UI lockup, so hard to verify the lockup but we should test view is still working as before (use a wallet with lots of accounts and tokens with balance):

  1. Test opening send and verify Select a Token to Send is still working as expected.
  2. Test networks filter & queries still working as expected.
  3. Test 'Show Zero Balance' button still appears when no tokens are visible (new wallet, or filter to a network without balance on current wallet)

Screenshots:

Reviewer Checklist:

github-actions[bot] commented 8 months ago

[puLL-Merge] - brave/brave-ios@8654

Description

This pull request makes several changes to the SendTokenView.swift, SelectAccountTokenView.swift, SelectAccountTokenStore.swift, RpcServiceExtensions.swift, and SelectAccountTokenStoreTests.swift files. The changes include updates to the way token stores are selected and updated, improvements to fetching account and asset information, modifications to the handling of balances, and changes related to network filtering.

Changes ### Changes - `SendTokenView.swift`: Updates the way token stores are selected and updated. - `SelectAccountTokenView.swift`: Implements changes related to the fetching of account and asset information, as well as modifications to the handling of balances. - `SelectAccountTokenStore.swift`: Introduces various updates to the way token stores are selected and updated, and includes changes related to network filtering and the way balances are handled. - `RpcServiceExtensions.swift`: Adds a new method for fetching balances for tokens. - `SelectAccountTokenStoreTests.swift`: Includes corresponding tests for the changes made in the `SelectAccountTokenStore` functionalities.

Security Hotspots

  1. There are no apparent security hotspots in the changes made.