-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
|
Hey @jfschwarz , great changes! Also, I was not able to Claim COW in Gnosis Chain due to this error: And I was not able to claim in the Mainnet due to I do not have an account (with a PK) that has locked GNO for claiming. |
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.
One quick feedback, which I was mentioning in slack. Do we really need to include these big JSON files?
Ideally we would not include parts of the ABI that are not needed, or generate TS declarations for unused methods.
Also, Im a bit concerned with adding these 2MB files for loading the profile. If you look how we did the airdrop in cowswap, we broke the big fat airdrop file into chunks, and we did a index for them. The index file will be small and will point to the chunk
cowswap/src/custom/state/claim/hooks/index.ts
Line 817 in b970550
return ( |
@elena-zh That's a good point! I've now adjusted the flex layout so that only if there's an odd number of boxes, the last one will take the entire width. As for the claiming, it's currently failing because the vesting contracts have not been funded with COW yet. So we must hold off releasing this PR until this has happened. @anxolin I like the idea and have split up the merkle proof data into chunks. 👍 |
@jfschwarz , thank you for improving the page layout! Looks much-much better! Could you please fix it? Thanks |
@elena-zh Interesting... 🤔 It seems we found a bug in webpack/babel. The transpilation in the production build was wrong. I've found a way to work around this bug and it's working now. |
Hey @jfschwarz , great! Now I can send a TX to sign a transaction to the wallet. However, still I'm not able to test changes to the end (run and finish a transaction) due to I do not have personal accounts with locked GNO in any network. A new tiny issue I have found is related to a mobile/table views: sections content exceeds sections' height, so it would be great to fix this. Thank you! |
Good catch, @elena-zh. fixed now ✔️ |
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.
LGTM now!
The vesting contracts have been funded in the meanwhile, so this would be ready to be merged. |
@elena-zh In terms of styling and responsive tests, approved. Thank you @jfschwarz ! |
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.
Approving based on styles/responsive tests.
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.
Hi, thanks for splitting the files into chunks. Looks better!
In general in our team we usually refuse to review very big PRs. We believe in smaller PR are easier to review, therefore will get more assurances. This one still has 53K changes. I know most of it are the TS declarations and ABIs, but we usually try to do these ones as independent PRs, and even with these ones out of the way, this PR does many things.
In this case, we can make an exception, although I would ask if we could not include the merkle data in our code. Instead we could load it from an external Gnosis repository. See how we didn't include even our claiming
export const CLAIMS_REPO = `https://raw.githubusercontent.com/gnosis/cow-merkle-drop/${CLAIMS_REPO_BRANCH}/` |
One reason for this, is that this is a one-off thing that makes our git more heavy, and add too many files we won't need in the future.
One additional nitpick, can you add SupportedChainId.MAINNET, etc instead of the hardcoded numbers for the network?
If you make this changes, with the noise out of the way, i can try to review the hooks and logic itself.
BTW, I see you didn't use our logic for finding the chunk given an address and make your own, was it not possible to refactor/reuse?
Yes, I can move it to an external repo. The disadvantage of that approach is that I will have to manually implement fetch and caching rather than relying on webpack to handle chunk loading automatically, but sure I can do it. I see your point of keeping git light. 👍
The existing claim data fetching uses two requests: One fetching the index containing all addresses, a second one for fetching the chunk. Arguably, doing two http roundtrips might turn out to be slower than simply fetching the entire claim data in a single request. Therefore, I used the fact that the claim data is sorted to create an index that is so slim it can be bundled. If you wanna further optimize load performance you might wanna change the existing claim mechanism in the same way. |
d473b9c
to
ddc923d
Compare
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 will have to agree with @anxolin here and request changes. There's too much noise coming from this change and I don't believe the potential performance benefit warrants adding this much bulk to the app. Everything else looks great, thanks for the submission. Looking forward to seeing the changes and merging this in.
Hey @jfschwarz , I have noticed that:
Then an incorrect 'waiting' modal appears: it says 'Claiming vested COW' instead of the 'Converting vCOW to COW' See the video: https://watch.screencastify.com/v/zPr5pm8QyM8AqkAabQ4i So we need to separate these waiting modals: Thanks! |
Another great catch, @elena-zh, thank you! 🙏 I've fixed it |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Summary
This PR adds a section to the profile page for letting users claim vested COW tokens they received for locking GNO.
It's based off #2643, which should be merged first so to make the review of this PR easier.
To Test
Profile
COW vesting from locked GNO
Claim COW
button, sign the transactionSuccessfully claimed
Background
To prevent a negative impact on page load performance, the merkle proof data for claiming the vested tokens is chunked and will be fetched lazily only when navigating to the profile page. The data can be found in this external repo: https://github.com/gnosis/locked-gno-cow-merkle-distro