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

Make testnet faucet page more efficient by adding input validation #259 #331

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

TusharKarkera22
Copy link
Contributor

@TusharKarkera22 TusharKarkera22 commented Jan 24, 2024

Make testnet faucet page more efficient by adding input validation #259

Description

I have disabled the button until valid input is given and included a computed property isCreateAccountButtonDisabled that checks for valid input conditions. If any of the input fields are empty or if the Telos owner key doesn't match the specified pattern, the button will remain disabled. This helps ensure that the button is only enabled when valid input is provided, addressing the issue

Test scenarios

The test scenarios included verifying the button's disabled state under different conditions. Initially, the button remained enabled despite invalid or empty input. After the code changes, the button correctly disables when any input field is blank or when invalid input is provided for the Telos owner key and active key. The validation ensures that the "Create testnet account" button is only clickable when valid input is provided.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage

Screenshot

image

Copy link

netlify bot commented Jan 24, 2024

Deploy Preview for telos-app-native-mainnet ready!

Name Link
🔨 Latest commit 349dc84
🔍 Latest deploy log https://app.netlify.com/sites/telos-app-native-mainnet/deploys/65b3780072c36b0008047dd7
😎 Deploy Preview https://deploy-preview-331--telos-app-native-mainnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

netlify bot commented Jan 24, 2024

Deploy Preview for telos-app-native-testnet ready!

Name Link
🔨 Latest commit 349dc84
🔍 Latest deploy log https://app.netlify.com/sites/telos-app-native-testnet/deploys/65b3780080967400087609d6
😎 Deploy Preview https://deploy-preview-331--telos-app-native-testnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@poplexity
Copy link
Member

There are 2 supported public key formats, might be good to accept either one?

Note here: https://explorer.telos.net/account/jessetest123?tab=keys

You can click the key icon to toggle between the two formats (EOS vs PUB_K1 prefixed)

@TusharKarkera22
Copy link
Contributor Author

I have added support for both public key format please check

@donnyquixotic donnyquixotic self-requested a review January 26, 2024 02:50
@poplexity
Copy link
Member

Looks good to me!

@TusharKarkera22
Copy link
Contributor Author

Could you do review again?

donnyquixotic
donnyquixotic previously approved these changes Feb 23, 2024
@donnyquixotic donnyquixotic changed the base branch from master to develop February 23, 2024 06:06
@donnyquixotic donnyquixotic dismissed their stale review February 23, 2024 06:06

The base branch was changed.

@donnyquixotic donnyquixotic merged commit 34819f9 into telosnetwork:develop Feb 23, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants