Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tokens.json] Automatically apply the Spam token icon instead of the one from sources like iconassets repo #6446

Closed
Tracked by #6449
hboon opened this issue Mar 3, 2023 · 3 comments · Fixed by #6657
Assignees

Comments

@hboon
Copy link
Member

hboon commented Mar 3, 2023

No description provided.

@eviltofu
Copy link
Contributor

eviltofu commented Apr 5, 2023

@hboon can you elaborate on this? Currently this is showing when a token is spam.
Screen Shot 2023-04-05 at 8 04 47 AM copy

@hboon
Copy link
Member Author

hboon commented Apr 5, 2023

@eviltofu we currently display the spam icon, as in the screenshot above for tokens we think are spam. We want to continue this effect.

Current implementation:

We don't use the Spam group from tokens.json to detect them. Instead, if we think 0x0b91b07beb67333225a5ba0259d55aee10e3a578 is spam, we'll upload an icon file to the iconassets repo with the word "spam" in it https://github.com/AlphaWallet/iconassets/blob/4d77b8d2160b5009e86cb46e138e13e113e74a0d/0x0b91b07beb67333225a5ba0259d55aee10e3a578/logo.png

So it's a lot more work than necessary and wasteful of bandwidth, storage etc

How the implementation should be:

We should check against the new-ish isSpam(address:chainId:) (I think that's what it's called) when fetching a token image and use a single copy of the icon file we will ship with the app and not involve the network at all. This might be a good place to start at and work upstream:

case alphaWallet = "https://raw.githubusercontent.com/AlphaWallet/iconassets/master/"

@eviltofu
Copy link
Contributor

eviltofu commented Apr 5, 2023

Needs #6645 to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants