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

Fields that take a number supports scientific notation #151

Open
onbjerg opened this issue Oct 22, 2020 · 5 comments
Open

Fields that take a number supports scientific notation #151

onbjerg opened this issue Oct 22, 2020 · 5 comments
Labels
🐛bug Something isn't working

Comments

@onbjerg
Copy link
Contributor

onbjerg commented Oct 22, 2020

Fields that take a number generally accepts scientific notation (e.g. 1e18 or just e) and other "invalid" inputs such as "-10" and so on.

Areas affected:

  • When supporting a proposal initially
  • When creating a funding proposal
  • When changing support

Low priority bug since the user will have to input this intentionally and transactions will revert in the case that the number is out of range (amount < 0 or amount > balance).

Credit to @anthonyoliai for reporting it on Discord first

@onbjerg onbjerg added the 🐛bug Something isn't working label Oct 22, 2020
@subbu0x0
Copy link

Same issue in honeycomb as well

@famole
Copy link
Collaborator

famole commented Oct 25, 2020

Hey @onbjerg,

-Founding proposal,

  • for negative numbers when you loose the focus, the field is cleaned.
  • for scientific notation this is what it shows

Screen Shot 2020-10-25 at 11 27 47 AM

Should we clean the field as negative numbers?

@onbjerg
Copy link
Contributor Author

onbjerg commented Oct 29, 2020

Yes, it doesn't make sense to have an infinite request amount, the transaction will just revert. Sorry for the delayed response.

@kamikazebr
Copy link
Member

It was solved? Need help?

@kamikazebr
Copy link
Member

kamikazebr commented Dec 19, 2021

I made some tests to undestand, the test below pass.

image

Its look correct?

So if find some e or minus need be 0 value, right? Test which pass below
image

@0xGabi @famole

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants