forked from mantinedev/next-app-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Describe the bug
We don't accurately round price to the 4th decimal 0.0001 which leads to poor UX from the UI.
To Reproduce
Set a non whole number price.
Place limit order.
See it not work with that price.
Expected behavior
That price is precise.
Additional context
| let priceLots = new BN(Math.floor(price / QUOTE_LOTS)); |
Is where I think it is. But it could be coming from the UI as well. We really should sanitize these values as well before blindly adding them into a TXN. I suggest we ensure the values match and if not we send message back to the UI for error handling.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request