mistswapdex / mistswap-interface

An open source interface for MistSwap
https://app.mistswap.fi
5 stars 14 forks source link

feat(ui): replace hardcoded farms with fetched from the graph #61

Open mainnet-pat opened 2 years ago

mainnet-pat commented 2 years ago

Assess #53 Remove hardcoded farms and fetch them from the graph. This is mostly a revert of your changes with some fixes. The TVL and ROI numbers are slightly different now, but are consistent with old ones

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mistswapdex/mistswap-interface/3LGzyXHiwEAp4Cbe2MfPyDzj41zk
✅ Preview: https://mistswap-interface-git-fork-mainnet-pat-graphfarms-mistswapdex.vercel.app

[Deployment for 77ea31f failed]

kasumi-1 commented 2 years ago

This doesn't have rpc fallback? I don't trust graph server to not fail.

mainnet-pat commented 2 years ago

Omg totally overseen that. Do you mean both logic pieces should be kept?

kasumi-1 commented 2 years ago

Ya - I think detecting if useFarms or something similar fails to cause rpc path?

mainnet-pat commented 2 years ago

Hi, this became a heavy refactor. Now I see that joy has some erroneous data in the graph showing funny tvl and apr. This is a draft. My react-fu turned out to be weak when doing such complex things, if I uncomment fetching the pending sushi for graph farms react gets angry at me for messing up the hook order. Do you have any hints?

mainnet-pat commented 2 years ago

Oops it seems not to build because of conditionals. Any further guidance is appreciated.