Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Markets: show error when defillama api fails #219

Closed doliG closed 1 year ago

doliG commented 1 year ago

Context

To display all available markets, we use Defillama API. It's an alpha version and sometimes it fails, so we have to find a way to display a nice error. Waiting for the design.

Todo

Related

doliG commented 1 year ago

@Markoyw FYI I created a task to handle the error state when defillama api fails, so you can mention me here when the design is ready :)

doliG commented 1 year ago

@brozorec says that these kind of errors should not happen because in case DefiLlam API fails then we don't have APY and APR and the rewards, but the rest should be available.

If the result is 0, then the frontend should display a "-" or "n/a" (@Markoyw which one do you think is better ?)

Markoyw commented 1 year ago

Hey @doliG

Curious - are we able to display an error icon next to it? Just so that the user is aware that it's an error, attaching an EX below,

image

brozorec commented 1 year ago

done with #292