Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Paras faucet integration #215

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Paras faucet integration #215

wants to merge 4 commits into from

Conversation

paouvrard
Copy link
Member

Integrate faucet in UI.

@zavodil it would be great it you could check the logic ! (I couldn't find production URLs so I left the test url, ill get in touch with you off-line)
Also please advise if the invite feature is really needed here or if I over simplified.

@corwinharrell Could you help with the design of this new modal ?
image

@paouvrard paouvrard requested review from heycorwin and zavodil April 14, 2021 13:49
@paouvrard paouvrard requested a review from chadoh as a code owner April 14, 2021 13:49
@heycorwin
Copy link

@paouvrard I'll take a look at this today. Design for this should be a little more considered and broken out into multiple steps rather than just exchanging messages within a single modal, so I'll put together an examples of that that looks like and will share.

Quick question, can we redirect users back to the bridge and/or prompt them to connect their new account once it has been created? I noticed right now that the flow just ends on the wallet after account creation with no direction for the user.

@zavodil
Copy link

zavodil commented Apr 14, 2021

Faucet Affiliate system introduced, please review https://github.com/zavodil/near-ethereum-faucet
the scenario is the following:

  1. user1 generates a linkdrop. We stored a near public key he used to make a claim.
  2. user1 gets an invite link as soon as linkdrop account is created. We can find his near_account using the explorer database.
  3. user1 sends an invite link to new user2
  4. if user2 already has faucet claims in the local storage then we ignore invite link
  5. after user2 creates an account then user1 gets totalAffiliates ++
  6. user1 sees claim reward button if totalAffiliates > claimedAffiliates.
  7. click on this button transfers affiliate reward to his near_account. claimedAffiliates sets to totalAffiliates

Additional features:

  • user doesn't see claim new account account button as soon as we have his near_account.
  • previous faucet users will not be able to invite and claim rewards since we don't know their near_accounts and near public key

I accidentally put affiliate reward to 0.1NEAR per user didn't get any instruction, let's decide how much to set

@heycorwin
Copy link

@paouvrard I've created a sequence for this faucet flow and have added it to the project Figma. Lmk if anything is missing or if you have any questions.

Screen Shot 2021-04-15 at 10 50 46 AM

@zavodil
Copy link

zavodil commented Apr 15, 2021

@paouvrard I've created a sequence for this faucet flow and have added it to the project Figma. Lmk if anything is missing or if you have any questions.

We have a few extra screens:

  1. user created a linkdrop but didn't create an account. We show a button to continue the process
  2. user created an account and now he has invite link. He will be able to see his affiliate reward and claim it

@heycorwin
Copy link

@zavodil gotcha. Can you guys infer how to approach the UI for those instances based on these designs or do you need mockups for each of those as well?

@paouvrard
Copy link
Member Author

@corwinharrell I think we need another modal image in case the user already claimed or in case there was an error (user doesn't have 0.05 ETH in the address, user is using the wrong browser, user deleted the key in localStorage etc ...)

@heycorwin
Copy link

heycorwin commented Apr 16, 2021

Alright I've added some additional variants for the additional scenarios. (Can view in Figma)

Screen Shot 2021-04-16 at 11 25 30 AM

@paouvrard
Copy link
Member Author

The newly designed modals have been implemented as above.
This PR is pending the new affiliate program functionality, not yet implemented here.
For the bridge frontend, this new functionality requires 2 actions:

  • Create affiliate link -> shareable with other users
  • Claim affiliate rewards -> claim rewards if other users have used your affiliate link.

These 2 new actions should be available from the landing page, and also from the transfers page.
Maybe displayed in a similar way to the telegram support channel link at the bottom.
Clicking them would open a modal similar to the wallet creation.

There is always the option of using the affiliate functionality on the paras website only.

@paouvrard paouvrard marked this pull request as draft May 25, 2021 10:41
@heycorwin
Copy link

@paouvrard any updates on this? We plan to integrate this into the wallet soon but just wanted to know if you guys ever moved forward on this integration.

@paouvrard
Copy link
Member Author

@corwinharrell I'm not up to date on the latest from the faucet/affiliate program.
The frontend claiming functionality was mostly done in this PR, but pending the affiliate backend review before implementing the functionality here. I haven't had time to look at it since then but if it is confirmed I can update this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants