White-Whale-Defi-Platform / white-whale-frontend

An open-source interface for multiple CosmWasm decentralized exchanges across chains. Additionally there are Pools and Flashloan enabled Vaults deployed on each chain as part of the White Whale's Liquidity Platform.
https://app.whitewhale.money
Apache License 2.0
24 stars 25 forks source link

fix: added additional validations to the WhaleInput #534

Closed jijicodes closed 8 months ago

jijicodes commented 8 months ago

Description and Motivation

Added validation to token input fields app-wide to improve ux.

Screenshot 2024-03-01 at 12 07 14 PM

Related Issues

Resolves #188


Checklist:

netlify[bot] commented 8 months ago

Deploy Preview for exquisite-salamander-a1fe5e ready!

Name Link
Latest commit e7fc72805455ef2db8b4ee852bad7b0ee39a077b
Latest deploy log https://app.netlify.com/sites/exquisite-salamander-a1fe5e/deploys/65e7b4cb2441c000087faf9e
Deploy Preview https://deploy-preview-534--exquisite-salamander-a1fe5e.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 22 (🔴 down 4 from production)
Accessibility: 95 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 83 (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.

nick134-bit commented 8 months ago

Thank you for your PR! can you also add a filter for these cases? : no negative numbers not starting with . @jijicodes

jijicodes commented 8 months ago

Thank you for your PR! can you also add a filter for these cases? : no negative numbers not starting with . @jijicodes

Hey @nick134-bit! Who could have guessed that those 2 extra validations would be so much trickier than the original two 😇. This issue was a good chance for me to dig into regex and hopefully this time regexes will stick in my head. Please let me know if there's anything else needed to this PR. It is pushed and ready for code review!

jijicodes commented 8 months ago

Re-reading through the original issue, I saw this message from @Sen-Com asking for the validation to be applied to the slippage tolerance input so I have pushed these changes as well. @nick134-bit