saddle-finance / saddle-frontend

An open source UI for saddle.finance 🤠
https://saddle.exchange
54 stars 58 forks source link

Remove `account` from `getGaugeData`, move to user-specific function #1187

Open hammeiam opened 2 years ago

hammeiam commented 2 years ago

getGaugeData and thus GaugeProvider should not have account as a dependency. userGaugeBalance, userGaugeWorkingBalance, and gaugeUserClaimableSDL should be moved to another function that is called by the UserProvider. Maintaining this separation means that we can reload data about the user's state without having to reload all data about gauges (or pools or tokens)