leather-io / extension

Leather browser extension
https://leather.io
MIT License
289 stars 137 forks source link

USD Value Display Not Updating for STX and Other Tokens #5508

Open DeeList opened 1 month ago

DeeList commented 1 month ago

The displayed STX USD value isn't updating to current pricing.

It appears other token USD values aren't updating either. This could be expected with $ALEX and ALEX exchange tokens as pools were temporarily closed and token migrations are taking place.

usdupdate alexstx expstx
314159265359879 commented 1 month ago

Additional context https://github.com/leather-wallet/extension/issues/5004

DeeList commented 1 month ago

Another screenshot several hours later. STX USD value remained the same.

later
314159265359879 commented 1 month ago

Is the user seeing connection issues in the console?

DeeList commented 1 month ago
err err2
314159265359879 commented 1 month ago

if those 451's are causing this it is odd they are seeing a dollar quote at all? that is a localization restriction.

We should show a loading error and/or no price quote when the required endpoint can't be reached for a price update.

markmhendrickson commented 1 month ago

This seems like an edge case in which 451s are encountered but only after the user is able to load balance-related data successfully? I would indeed expect the balance to simply error out if we aren't able to refresh the data.

@fabric-8 do we have design guidance for the error state of balances? I can't recall personally if we've produced that yet.

fabric-8 commented 1 month ago

@markmhendrickson We did capture this case in the past, but didn't fully conclude and wrapped up temporarily with the newly added loading states.

Since this is affecting USD values specifically, how about we:

  1. Don't display USD values within the affected token balances
  2. Give the user a heads-up in the context of the total available balance, ie by changing the color + adding an indicator icon which upon hovering reveals further information
markmhendrickson commented 4 weeks ago

I like it! Though it may be more generic and accurate to say Value may be inaccurate due to issue with loading new data for whenever we need to use this pattern for any data across the UI that fails to refresh?

Also, do we need a failure state for when the data can't be pulled for the first time i.e. when we don't have any previously cached value to show?