gnosis / cowswap

🐮 CowSwap: First Gnosis Protocol v2 UI
https://gnosis.io
GNU General Public License v3.0
113 stars 55 forks source link

[Affiliate] Use ENS on affiliate link #1682

Open alfetopito opened 2 years ago

alfetopito commented 2 years ago

related to #1575

Summary

Allow users to share and load affiliate links with ENS as well as ethereum addresses.

Example: https://cowswap.exchange/?referral=macb.eth

This has two parts:

  1. Allow users to follow links with ENS on the affiliate

Interface will try to de-refence that into an address and use that if successful. If not, let user know the affiliate is invalid

  1. Allow users to pick one ENS domain if their address has any configured

Interface will search for ENS domains for connected address and let user know they can be used. Behaviour to be defined as part of the task


hey @alfetopito , I have just realized that we can have ENS names instead of wallet addresses in the referral URLs. So, my question is: will the app be able to validate this when sharing a referral link with an ENS name in the URL? If yes, we should include ENS name validation into the current task along with wallet address validation rules.

Originally posted by @elena-zh in https://github.com/gnosis/cowswap/issues/1570#issuecomment-948454202

alongoni commented 2 years ago

Hey @alfetopito and @ramirotw here are some designs for desktop view (I've in progress the mobile version). Notes: If a user has a ENS domain, it will appear selected by default in the dropdown. affiliate-v1 8 - desktopens Open: affiliate-v1 8 - desktoplong

Referral code with Address: affiliate-v1 8 - desktophash-open

alfetopito commented 2 years ago

Looks good to me.

Final check by @biocom

fairlighteth commented 2 years ago

Minor comment: The dropdown menu, background could use a better contrasting color, to make it stand out from the container color below.

alongoni commented 2 years ago

Thanks for the feedback! CowSwap - Account page (affiliate-v1 8 - desktophash-open

Here is the design for mobile. (I was wondering if it is necessary to apply a short version of the address, e.g., 0x699....ba4f) CowSwap - Account page (affiliate-v1 8 - mobile CowSwap - Account page (affiliate-v1 8 - mobile-1

cc @alfetopito @biocom

alfetopito commented 2 years ago

@alongoni I like it, and I also like the idea of shortening the address on smaller screens

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you think it shouldn't be closed, speak now or forever hold your peace.

ramirotw commented 2 years ago

@alfetopito just wanted to confirm if this is still needed.

alfetopito commented 2 years ago

Yes, let's finish this one 👍