0xProject / 0x-launch-kit-frontend

Apache License 2.0
112 stars 207 forks source link

Adding new custom token .svg icons does not work #517

Closed icinsight closed 5 years ago

icinsight commented 5 years ago

For some reason, I'm not able to add new token.svg icons. I can change existing ones, but as soon as it is the question of token that I added myself (i.e. not one of those in the repo already), the system renders a "color ball + symbol" icon, even though a fully functional .svg file for that token is there.

image

image

unjapones commented 5 years ago

@icinsight I'm afraid that, because of the way we load SVG files you will have to:

  1. add the file to the corresponding location (you already did this).
  2. modify a little bit the source code, import that file and add it here src/components/common/icons/token_icon.tsx.

Did the above help? If it did, it may be a good idea to add this to the docs.

icinsight commented 5 years ago

Ok, I may have missed the token_icon.tsx file. Thanks!

Just update your documentation, and I will do the same with mine!

icinsight commented 5 years ago

I got this working just fine: http://dex.0xchange.org:3002/#/erc20/my-wallet?base=king&quote=xbc