Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #6982: Auto-complete adding known custom assets #6990

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

StephenHeaps
Copy link
Contributor

Summary of Changes

  • Fix logic for auto-complete only working for Ethereum addresses, so Solana mint addresses were not checked against known assets.
  • Set network of autocompleted token
  • Fetching token info is currently only supported on Ethereum Mainnet, however you can add a Ethereum Mainnet asset while on any network with multichain updates so we should no longer check the selected network is ethereum mainnet.

This pull request fixes #6982

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()
  • New or updated UI has been tested across:
    • Light & dark mode
    • Different size classes (iPhone, landscape, iPad)
    • Different dynamic type sizes

Test Plan:

  1. Enter a custom Solana asset (in our blockchain registry) contract address:
    • ex. USDC mint address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
    • ex. Wrapped BAT (Portal) mint address: EPeUFDgHRxs9xxEPVaL6kfGQvCon7jmAWKVUHuux1Tpz
  2. Verify details auto-complete, asset can be added
  3. Add a custom Ethereum asset in our blockchain registry
    • ex. Wrapped BTC contract address: 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
  4. Verify details auto-complete
  5. Add a custom Ethereum asset not in our blockchain registry (requires network lookup)
    • ex. UNI contract address: 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984
  6. Verify details auto-complete

Encountered #6989 during development

Screenshots:

6982.mp4

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue and pull request is assigned to a milestone (should happen at merge time).

…for non-ethereum addresses (ex. Solana tokens)
@StephenHeaps StephenHeaps added this to the 1.49 milestone Feb 22, 2023
@StephenHeaps StephenHeaps requested a review from nuo-xu February 22, 2023 16:09
@StephenHeaps StephenHeaps requested a review from a team as a code owner February 22, 2023 16:09
@StephenHeaps StephenHeaps self-assigned this Feb 22, 2023
@StephenHeaps StephenHeaps merged commit 45b4919 into development Feb 22, 2023
@StephenHeaps StephenHeaps deleted the wallet/add-custom-asset-autocomplete branch February 22, 2023 20:44
arthuredelstein pushed a commit to brave/brave-core that referenced this pull request Feb 13, 2024
…rave/brave-ios#6990)

* Fix auto-complete for adding custom tokens not using our token lists for non-ethereum addresses (ex. Solana tokens)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-complete adding custom Solana asset(s)
2 participants