Skip to content
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(core): testnet faucet page with recaptcha #344

Merged
merged 55 commits into from
Nov 24, 2023

Conversation

chloezxyy
Copy link
Member

@chloezxyy chloezxyy commented Nov 2, 2023

What this PR does / why we need it:

Faucet page for users to get testnet tokens. Includes:

  • Hide faucet page when not in testnet env
  • Faucet to validate whether if user input a valid evm address and recaptcha validation, before being able to send tokens

To test:

  • Update PRIVATE_KEY in /server/.env file to a wallet address that has funds to send to the input wallet address
  • Need a SECRET_KEY for validating the recaptcha value (can get from @chloezxyy)

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

Developer Checklist:

  • Read your code changes at least once
  • Your UI implementation visually matched the rendered design*
  • Unit tests*
  • Added e2e tests*

Copy link

netlify bot commented Nov 2, 2023

Deploy Preview for defimetascan ready!

Name Link
🔨 Latest commit d0f59dc
🔍 Latest deploy log https://app.netlify.com/sites/defimetascan/deploys/6560972b76c048000708ac91
😎 Deploy Preview https://deploy-preview-344--defimetascan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 57 (🔴 down 1 from production)
Accessibility: 81 (no change from production)
Best Practices: 83 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the kind/feature New feature request label Nov 2, 2023
src/layouts/components/TextInput.tsx Outdated Show resolved Hide resolved
src/pages/faucet/index.tsx Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
chloezxyy and others added 12 commits November 7, 2023 15:11
* feature(api): added api for faucet to allocate fund to user

* added e2e test

* fixed pr comments

* added e2e for ratelimiting

* added invalid address test case
@chloezxyy chloezxyy marked this pull request as ready for review November 24, 2023 07:15
apps/web/src/api/FaucetApi.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
* added loader and link to metascan

* fixing issue that txnHash does not exist on metascan yet

* reverted linking to metascan

* revert unnecessayr change for sectionDesc

* added more text

* Update apps/web/src/pages/faucet/index.tsx

Co-authored-by: Harsh R <53080940+fullstackninja864@users.noreply.github.com>

* did UI comments & ran prettier

* changed to using react-icon

* removed react-spinners

* set isLoading back to false

* ui comments

* Update apps/web/src/pages/faucet/index.tsx

Co-authored-by: Harsh R <53080940+fullstackninja864@users.noreply.github.com>

* Update apps/web/src/pages/faucet/index.tsx

Co-authored-by: Harsh R <53080940+fullstackninja864@users.noreply.github.com>

* used animate-spin

* used tailwind color

* revert isLoading value to false

* changed to divs

* will do button variants in a diff PR

* added invalid address error text

* enable button even after errors

* print default error msg

* made recaptcha dark

* minor fixes

---------

Co-authored-by: Harsh R <53080940+fullstackninja864@users.noreply.github.com>
Co-authored-by: Harsh <harshrathi.dev@gmail.com>
@fullstackninja864 fullstackninja864 merged commit a193692 into main Nov 24, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants