robosats icon indicating copy to clipboard operation
robosats copied to clipboard

Decimals on % Premium over market

Open ghost opened this issue 2 years ago • 4 comments

Two issues when entering the decimals on Premium over market percentage:

  1. If you add 3 decimals or more in the % Premium over market, nothing happens when you click on "CREATE ORDER" and you can't continue.

image

  1. If you add a comma (like numbers in Spanish) instead a point as decimal separator, you can't continue and the placeholder appears:

image

ghost avatar May 01 '22 21:05 ghost

Thanks for reporting!! @ibertario

  1. Indeed, the DecimalField for the Premium only accepts 2 decimals. So the API call probably is returning an unhandled bad request. Best fix seems to limit the Input to a max of 2 decimals.

  2. I cannot replicate this issue, what browser are you using? Certainly the european "," as decimal separator does not work, I will look for a fix. In Tor Browser it lets me input the "," even though it doesn't parse anything after the decimal. In Brave the "," simply is never shown. Could not replicate the label and the input overlapping.

Cheers!

Reckless-Satoshi avatar May 01 '22 22:05 Reckless-Satoshi

2. I cannot replicate this issue, what browser are you using? ...
Could not replicate the label and the input overlapping.

Tor browser mobile or desktop. Insert a comma and then click outside.

ibertario avatar May 02 '22 10:05 ibertario

Tor browser mobile or desktop. Insert a comma and then click outside.

Tested! Exactly as described. Seems to mostly be an issue (or design?) of Material UI's TextField. Will check online whether this has been spotted by others.

Reckless-Satoshi avatar May 02 '22 17:05 Reckless-Satoshi

This issue seems to be fixed. I am not able to replicate it, the maker form doesn't let me input numbers with more than 2 decimals. I believe that the code that restricts the 2 decimals is here.

bitcoin-solo avatar Dec 23 '22 23:12 bitcoin-solo