brave / brave-browser

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

Brave Wallet reporting wrong AURORA price on NEAR #41279

Open 2dpetkov opened 2 months ago

2dpetkov commented 2 months ago

Description

When connecting to NEAR via an Ethereum-compatible RPC, Brave Wallet displays an incorrect AURORA token price. This seems to be only partially related to #23029 and #27466

Steps to reproduce

  1. Add NEAR Protocol in the Settings -> Web3 -> Wallet Networks

    image
  2. Add AURORA as a custom asset (Portfolio -> Visible assets icon -> Available assets -> Add custom asset)

    image

Address: 0x38e0355ecD67b979909c8Ad80596Caf47746B792

Icon URL:

data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 288 288' style='enable-background:new 0 0 288 288;' xml:space='preserve'%3E %3Cstyle type='text/css'%3E .st0%7Bfill:%2370D44B;%7D .st1%7Bfill:%23FFFFFF;%7D %3C/style%3E %3Cpath class='st0' d='M144,0L144,0c79.5,0,144,64.5,144,144v0c0,79.5-64.5,144-144,144h0C64.5,288,0,223.5,0,144v0 C0,64.5,64.5,0,144,0z'/%3E %3Cpath class='st1' d='M144,58.8c7.6,0,14.5,4.3,17.9,11.1l56.2,112.5c4.9,9.9,0.9,21.9-9,26.8c-2.8,1.4-5.8,2.1-8.9,2.1H87.8 c-11,0-20-9-20-20c0-3.1,0.7-6.2,2.1-8.9l56.2-112.5C129.5,63,136.4,58.7,144,58.8 M144,45c-12.8,0-24.5,7.2-30.2,18.7L57.6,176.2 c-8.3,16.7-1.6,36.9,15.1,45.3c4.7,2.3,9.9,3.6,15.1,3.6h112.5c18.6,0,33.8-15.1,33.8-33.7c0-5.2-1.2-10.4-3.6-15.1L174.2,63.7 C168.5,52.2,156.8,45,144,45z'/%3E %3C/svg%3E

(there is a known issue with displaying data: urls: #41104 )

NOTE: use empty Coingecko ID

  1. Click Add and go back to Portfolio

Actual result

A price is displayed for the Aurora token, however it's way different than the actual price

image

Expected result

Either

  1. Display $0, like other tokens tokens without Coingecko ID
  2. Display the aurora-near price from the token-lists repository

Price when Coingecko ID is manually set to aurora-near:

image

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.70.119 Chromium: 129.0.6668.70 (Official Build) (arm64)

Channel information

Reproducibility

Miscellaneous information

No response

lampamazaza commented 1 month ago

A pr to address this issue - https://github.com/brave/token-lists/pull/156 By hardcoding some assets in token list

lampamazaza commented 1 month ago

Any update ???