Fujicracy / fuji-v2

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

Borrow: Add vault dropdown #137

Closed iafhurtado closed 1 year ago

iafhurtado commented 1 year ago

Since the Safety Rating appeared a little bit after the first integration of the Borrow Page design, we are missing to integrate the Safety Rating dropdown.

Image

doliG commented 1 year ago

Hey @brozorec ,

Got quite the same problem here: I can retrieve a list of providers from the SDK, but I dont' know how am I suppose to display markets icons (i.e I can retrieve let's say provider Aave and map it to an image with the same name, but how am I supposed to know that the market is compound ?).

Available to call on that topic, I won't move the ticket because although I need more informations to finish I can continue the integration.

Thanks.

brozorec commented 1 year ago

hey @doliG each element of the returned array from vault.getProviders() contains a prop name that contains the name of the provider. On testnet, those names are something like "Mock V0" or "Mock V1" or "Provider 1" but in production they will contain the real names. We'll be starting off with Aave, Compound, Euler and Morpho.

doliG commented 1 year ago

@brozorec ok but in that case it's weird to put all the icons of the available provider into the button that open the dropdown. To me it make more sense to to it like

Screenshot 2022-11-21 at 17-28-56 Borrow - xFuji

Also I don't think I have any vault that is currently returning more than one provider (although I didn't test everything)

brozorec commented 1 year ago

I wouldn't say, it's weird. It's how we display them in the "Markets" too. I just put an additional provider for each vault, so now they have two each ;)

doliG commented 1 year ago

It's weird because it's not clear for the user wich provider is selected, he must select it from the menu then look down into "overview > provider" to check if his choice has been selected.

Let's implement it like that and ask Mark when he's back 🤔

Also, can you give me a list of all available providers we're going to use and their name ? I'll also need the guarantee that name won't change or an id to mape a provider to it's image.

Thanks !

brozorec commented 1 year ago

It's weird because it's not clear for the user wich provider is selected, he must select it from the menu then look down into "overview > provider" to check if his choice has been selected.

The active provider is displayed in the section "Collateral will be deposit into". From this dropdown the user chooses a vault depending on the risk rating. The risk rating is determined by the list of providers to which this vault is linked. So that's why it's important to see there the whole list of providers.

Also, can you give me a list of all available providers we're going to use and their name ?

Check previous comment