-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat(ui): apply diamond architecture to staking page #804
Conversation
@bojan07 is it ready for review? |
Not yet, I have found some bugs when running.. still on it.. will be ready for review soon |
…ts to avoid invalid hook call
@rndquu @molecula451 ready for a review |
@rndquu when running the UI, |
|
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.
- Naming should be as explicit as possible. This property should be something like
sushiPoolGovernanceDollarLp
(we have a convention of not using tokens names likeUAD, UBQ, etc..
but rather full namesDollar, Governance, etc...
). The same thing applies to metaPool which should be smth likecurveMetaPoolDollarTriPoolLp
(so that it was obvious from the 1st glance what is this contract about) - There should not be any errors on start. Either hardcode sushi swap pool and curve metapool addresses on the frontend either update the deployment script. The purpose of this issue is to make staking back to work. We'll refactor hardcoded values later.
- Even when I hardcoded all of the addresses (sushi swap pool , curve meta poll) I got the following error for the address which doesn't have any staked tokens (pls fix):
Oh.. I also hardcoded those address and checked, but I couldn't find that error case |
I have read this review again. you are asking me to update smart contract deployment script? If yes, I think it will be another issue related to smart contract, not to ui. What do you think? |
I'm going to open a new PR for credit page issue with the work for uniswap router issue. And hope you to update me if you find something useful for that uniswap router issue |
And if there is no problem with the current codebase, it's good to merge this PR for staking page issue, I think |
@molecula451 last two commits(88c1b46, 9e07817) in this PR involves the work for the diamond architecture implementation to credit page, except for removing all non-null assertion operators |
packages/dapp/components/lib/hooks/contracts/use-protocol-contracts.ts
Outdated
Show resolved
Hide resolved
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.
Overall the code seems fine. Unfortunately I'm not familiar with the context because I haven't worked with this code in several months.
Variable names must be changed according to the link I shared.
Got it. Let me change the names according to the link |
Regarding your questions in telegram DM
No, not everything is fixed. There's a huge red error if you open the credits page.
I will definitely review the PR again when the credits page is opened without any errors. Rerarding this PR:
|
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.
it all points that the Uniswap router thing is a package issue that either we have to solve on the front end (on another issue) but it was not really introduced by these changes |
@rndquu it seems incredible but here is the bug https://github.com/Uniswap/sdk-core/blob/main/src/chains.ts#L1 the package is used by Uniswap-Smart Router, we have to clean many of the lines at |
this line make use of one of the chains at https://github.com/Uniswap/sdk-core/blob/main/src/chains.ts#L1 , but when we switch to local anvil (where our building is) it pops so updating part of the package, and replacing |
@bojan07 can you make use of
|
Approving this PR because the contributor successfully met the specs, all the bugs and pop ups are coming up from old code |
Thanks for your review. @molecula451 Really professional and detailed 👍 |
Resolves #785