-
Notifications
You must be signed in to change notification settings - Fork 52
Add Portfolio page #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Portfolio page #513
Conversation
|
@jophish is attempting to deploy a commit to the Ubeswap Team on Vercel. A member of the Team first needs to authorize it. |
| return token && totalSupply ? new TokenAmount(token, totalSupply.toString()) : undefined | ||
| } | ||
|
|
||
| export function useTotalSupplies(tokens?: (Token | undefined)[]): { [tokenAddress: string]: TokenAmount | undefined } { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This useTotalSupplies hook is required in the useCalculateLPPortfolio hook, in order to eventually calculate the total value of a user's LP holdings; we can't use useTotalSupply there, since a user's LP holdings may change, and iterating over all LP tokens and calling useTotalSupply for each may violate React's invariant of hooks being called in the same order every render.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I also figure this hook could probably be useful elsewhere in the codebase!)
|
@BriungRi Bumping this here since this has been stale for a while; I believe you've been CC'd on an email thread relating to this work. This work is the result of an Ubeswap community grant; I would like to get this merged in and close out the grant, if still possible. |
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/ubeswap/ubeswap-interface/9cNCKgtFMitT7UZnXBmNT5MFHSDu |
|
@BriungRi Thanks; pushed some changes and should be good now. Let me know if there are other issues. |
|
@BriungRi Bumping on this again. |


Adds in a Portfolio page for users to track their total holdings, LP/token spit, token distribution, and LP distribution.