trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
681 stars 246 forks source link

Handle failed loading of token definitions #11540

Open tomasklim opened 4 months ago

tomasklim commented 4 months ago

If token definition fetching fails or user is offline on remembered wallet:

  1. Even legit tokens are marked as unrecognised. Screenshot 2024-03-11 at 13 00 22

  2. Even legit token/nft txs are marked as scam. Screenshot 2024-03-11 at 13 03 39

If fetching fails, it should refetch token definitions in 1 minute, but what if it keeps failing because we have some issue on data.trezor.io?

We just can't simply start showing everything as legit, people can be used to our phishing labeling. We probably need some UI communication?

  1. I can just remove the heading in tokens page and in send form select for tokens if definitions are not available because of an error
  2. I can stop labeling all txs if we do not have token definitions, but is it smart?
  3. We can start bundling token definitions as a fallback, but it is like 1MB to current app size. Does BTC users want to have some solana, cardano, ethereum, polygon data there?

https://github.com/trezor/trezor-suite/pull/11484#issuecomment-1985359613

sime commented 4 months ago

We can start bundling token definitions as a fallback, but it is like 1MB to current app size.

My personal preference. Makes the app more resilient.