Description of the issue:
When adding custom tokens that are not popular like for example HUSKY, or FLOKI. I go to the custom add function and enter the required details manually which is all good. But once the token is added and now visible in the brave wallet, I notice that the API that fetch the price of those token is completely wrong and I would like to fix it somehow but I can’t.
It seems like the brave price fetcher is broken because the coingecko page has another price than the one shown by the brave wallet listing.
There is no wrong price, because there is no single price. Prices are different from exchange to exchange.
Not popular tokens have low liquidity, thus the prices may have a substantial difference.
Sites like Coingecko and Coinmarketcap try to aggregate prices from different platforms and show an average price. But even these sites show different prices, as their calculated average is based on different sources.
Below some screenshots from Coingecko and Coinmarketcap where it is possible to see prices from different platforms.
That’s an excellent point which I did not consider. I agree with you on that.
I am concerned by those two specific coins (Floki and Husky) because the difference is so huge that it is unreliable in the listing of the Brave wallet.
I own ~40$ of Husky according to both coinmarketcap and coingecko, but in the Brave Wallet, even if the coin points to the same coingecko id, it says I have 583k USD worth of Husky.
I suspect that the fetch function is using a wrong address or something and I would like to be able to fix it manually in edge cases like this one. If for example we could click on the coin and edit the data manually to ensure there is no obvious human entry mistake there it could fix the problem.
And also, if the code is open-source I am open to contribute if it is Javascript or Typescript.
If you see this huge difference, it may be possible that the number of decimals is wrong in the token definition.
Did you add these tokens yourself to Brave wallet? If so, try to remove them and adding again using the correct decimals. You can find the correct decimals in the contract page at bscan.
When I click the 3 dots on the token in Brave wallet, to view token details and/or View on block explorer, it is the correct data for both. But the price fetching is still wrong.