-
Notifications
You must be signed in to change notification settings - Fork 570
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
Inaccurate floating point numbers used in credit offers #3487
Comments
I have dealt with this issue, if you have time you can review and merge. |
Fix inaccurate floating point numbers used in credit offers #3487
Please check again |
I think it's not fixed. |
I replaced the division with multiplication, the precision should no longer affect |
@xiangxn please check the calculation and if accurate now we can close |
Sorry, I forgot to clean up the original |
I've fixed this and tested it. you can merge. |
Fix inaccurate floating point numbers used in credit offers #3487
I have reprocessed. @abitmore The Fee issue, I checked it, this is because the partial op number returned by the api did not cause the front-end read to fail, which requires opening a new For example: Because of this problem, UI's fee calculation after OP number 40 is all wrong. |
Fix inaccurate floating point numbers used in credit offers #3487
Describe the bug
Certain credit offers cannot be accepted due to the use of inaccurate floating point numbers to calculate collateral amounts.
To Reproduce
Steps to reproduce the behavior:
1.21.79
offer100
(XBTSX.HIVE
), see the collateral amount is5,999.99881 BTS
, which is insufficient because the required collateral ratio is1 HIVE / 60 BTS
Expected behavior
No error
Screenshots
![image](https://user-images.githubusercontent.com/9946777/162443736-9880d5f1-bc78-4fd7-9d10-c82990f04d2f.png)
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: