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

dApp: Action duration estimation & validation #790

Merged
merged 7 commits into from
Oct 29, 2024

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Oct 28, 2024

Closes: #789

Changes:

  • Implemented action duration estimation based on given amount
  • Updated form validation strategy to update the state dynamically based on given value
Screen.Recording.2024-10-28.at.15.48.57.mov

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit b7f6dd2
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/6720d58ca2868b0008c86388
😎 Deploy Preview https://deploy-preview-790--acre-dapp-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.

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit b7f6dd2
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp/deploys/6720d58d998e3f000849d792
😎 Deploy Preview https://deploy-preview-790--acre-dapp.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.

@@ -37,7 +37,7 @@ const TokenAmountForm = withFormik<TokenAmountFormProps, TokenAmountFormValues>(
props.onSubmitForm(values)
},
validateOnBlur: false,
validateOnChange: false,
validateOnChange: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wanted to avoid running the validation on any input change for the amount field.
Currently, when you start entering the value starting with 0 you will immediately see the validation error. We want to run the validation when the user exits the input field.
So validateOnBlur seems like a better fit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree. Let's change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ref commit: 878b1f4

@kpyszkowski kpyszkowski changed the title dApp: Action duration estimation dApp: Action duration estimation & validation Oct 29, 2024
@kkosiorowska kkosiorowska merged commit e27b651 into main Oct 29, 2024
26 of 28 checks passed
@kkosiorowska kkosiorowska deleted the deposit-duration-estimation branch October 29, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action duration estimation
3 participants