brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.76k stars 2.32k forks source link

Do not remove all coins with the same contract id unless the chain ids match #35150

Closed josheleonard closed 9 months ago

josheleonard commented 9 months ago

Description

When removing assets via the visible assets modal, multipole coins may be removed if the contract addresses are the same. We should also check that the chain ids match before removing assets.

Steps to Reproduce

  1. Add 2 tokens to the wallet with the same contract address, but different chain ids
  2. open visible assets modal
  3. remove on the tokens

Actual result:

Both tokens are removed

Expected result:

only the selected token should be removed

Reproduces how often:

Brave version (brave://version info)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

kjozwiak commented 8 months ago

The above requires 1.62.165 or higher for 1.62.x verification 👍

srirambv commented 8 months ago

Verification passed on

Brave 1.62.165 Chromium: 121.0.6167.184 (Official Build) (64-bit)
Revision 646e9a49ef45084cb2341eb1e9afabc339004a27
OS Windows 11 Version 23H2 (Build 22631.3155)

https://github.com/brave/brave-browser/assets/17010094/94f329c1-7e3c-4acf-afef-2301926f4cc4