-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add Create LlamaPay Vesting iframe hook #5045
Add Create LlamaPay Vesting iframe hook #5045
Conversation
Hi @elena-zh, thanks for your feedback! I had to open this new PR because I unintentionally closed the first one, sorry about that. Despite some issues are still on progress, I'll let some updates down here. Feel free to point more issues in the meantime.
|
Hey @JeanNeiverth , great job, thank you! Some my notes:
Thank you for explanation, but my question here is related to a bit different thing: if proxy address is used for all these 3 cases, then, I think, the same behavior should be applied on the UI, and the recipient address (with the appropriate warning in the confirm modal) should appear when I pick option 2 and 3. WDYT? Thanks! |
Hi @elena-zh, Thanks again for your reviews! I've addressed the first 4 topics. Regarding the 5th point about the proxy/address warning: Currently, this notification appears only during the swap step. Since the hook summary UI exists outside the hook dapp, we have limited ability to modify these warning displays from the dapp side. In my point of view, the warning's purpose is to inform users: "Hey, be careful! The tokens from this swap will be directed to a different address than your main account." In cases where we're adding, for example, a create vesting hook, this warning may not be as necessary since users would expect their tokens to be sent to a vesting contract (and the proxy is just a sort of technical step inside this to make the operation safer). I understand that, if we think this way, then it would be better to remove the recipient warning for the 1st case, but I assume it can tricky to handle this on the swap UI side. WDYT @shoom3301 @alfetopito? |
Hey @JeanNeiverth , thanks for fixes. |
@JeanNeiverth I think the hook is supposed to change recepient to the proxy address always, isn't it? |
@shoom3301 on my understanding this is not a bug. Using the entire balance after the swap represents the current balance + executed buy amount. In that sense, even if we change the receiver to the proxy address we still have to pull the current balance from the user's wallet, so it is easier to not override the recipient and pull all the tokens after the swap. |
Hi @elena-zh! About the lack of warning in sell orders, that's strange 🤔... For me it's working fine here I am testing it the following way: if I want a sell order, I edit the swap amount of the token I'm selling in the swap section (then the warning appears). If I want a buy order, just the opposite, I set the amount of the tokens I'm buying (and it works, no more warnings) Could you provide more details about how are you testing this? |
Hey @JeanNeiverth , As for this statement:
but the entire swap outcome will be sent to another (proxy) address: isn't it a 'send to recipient' option, no? So a user should be warned about it like it is done for the 1st option |
@JeanNeiverth is attempting to deploy a commit to the cow Team on Vercel. A member of the Team first needs to authorize it. |
Hi @elena-zh, thanks for providing more information I understand the issue now: this PR was created before the order kind started being passed to the hooks. That's why if you try to access the deployment link you have here this feature won't work (I'm merging with develop to fix this, but someone will have to authorize deploy first). For now, you can see it working if you access develop https://dev.swap.cow.fi/#/100/swap/hooks/ and add custom post-hook with URL https://cow-hooks-dapps-create-vesting.vercel.app |
@elena-zh About this:
I talked with @shoom3301 and @alfetopito about this and it is a different behavior in my opinion. The tokens are being sent to another address but via the hook and not via the swap, and that is why there isn't a warning. However, I get your point that could be clear to the user that his funds are being sent to another address and that is the case for all hooks that are interacting with the proxy (including pre-hooks). So, we are thinking of adding another kind of warning to show this information to the user in a future PR. How does this sound to you? |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @JeanNeiverth , @yvesfracari , thank you for clarification. As for the current PR:
Thanks |
Hey @elena-zh ! Thanks for the feedbacks! 1- Thanks for noticing this! I marked the app as not supporting Safe (not sure if it will reflect on the next deployment or not). However, that flow of connecting via Wallet connect might happen again. However, as was mentioned on the Withdraw Hook review, this should be handle on cowswap side (outside the context of this PR). 2- Done. |
Thanks for the feedback @elena-zh ! 1- Done. |
Hey @yvesfracari , great, thank you! My last 2 UI improvements I'd like to report:
|
Thanks for catching this @elena-zh ! I tried to apply these layout changes, let me know if there is something else to be done! |
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.
Thank you!
The only thing that I want to mention is that in your PRs it is impossible to connect to MM atm: |
Thanks for the review @elena-zh ! Regarding the Metamask warning, this doesn't seem related to none of these PRs (just need to update the package maybe), but I think this should be made on a separate PR cc @shoom3301 @alfetopito @anxolin |
Summary
Add Create LlamaPay Vesting hook


To Test
/#/100/swap/hooks/
running locally) or (accesshttps://dev.swap.cow.fi/#/100/swap/hooks/
and add custom post-hook with URLhttps://cow-hooks-dapps-create-vesting.vercel.app
)Issues that are still being fixed:
Other info
Old PR: #5026