bitshares / bitshares-ui

Fully featured Graphical User Interface / Reference Wallet for the BitShares Blockchain
https://wallet.bitshares.org
MIT License
517 stars 570 forks source link

Error in market limit order pricing calculation? #3689

Open grctest opened 10 months ago

grctest commented 10 months ago

Describe the bug

For user 'fkh2jevt` there are 2 open orders with price 0.00000 in the 'my open orders' section of the HONEST.USD_BTS market.

Also showing as 0.00000 price in the buy orders component.

To Reproduce

Navigate to this user's webapp view by searching for their name in the explorer, then go to the HONEST.USD_BTS market and view the my open orders and buy orders (show more orders to view).

Expected behavior

A price greater than 0 should be calculated.

Screenshots

image image

Additional info

https://blocksights.info/#/objects/1.7.456286605

abitmore commented 10 months ago

As @litepresence said in Telegram:

its not a calculation issue its just truncated for display

It's a UI issue. I don't think hiding the orders is a good idea. Maybe better show 0.0000> or something alike and if the user moves the mouse over it shows the full numbers. Also the 10M amount is too wide already.

grctest commented 10 months ago

Good point, I have adapted to this issue in the astro ui as such:

image
abitmore commented 10 months ago

Good point, I have adapted to this issue in the astro ui as such:

Not bad. Just FYI I think in a financial system, numbers are better aligned with decimal points.

grctest commented 10 months ago

OK I've changed the < min string to allow a greater quantity of decimal places as so:

image
abitmore commented 10 months ago

OK I've changed the < min string to allow a greater quantity of decimal places as so

What if an order's price is 0.000000000000000000000000001, and another order's price is 100000000000000000000000.0, while typical orders' prices in that market are like 123.456789? :wink: In markets with few orders, prices vary widely. In popular markets where the first API call only returns the top X orders, the situation is different.

By the way the BTS amounts are not aligned with decimal points.

To be clear, I'm not being picky, and I know it takes a lot of effort to improve UX, finding a "good enough" solution is already very hard, let alone a "perfect" one. So please just do what you think is okay, and prioritize tasks appropriately.

Thank you anyway.

grctest commented 10 months ago

By the way the BTS amounts are not aligned with decimal points.

What do you mean? Like the decimal point "." should be aligned like this?

image

I've adjusted the UX to show < min and on hover shows the real price with auto-adjusting width:

openOrders

abitmore commented 10 months ago

By the way the BTS amounts are not aligned with decimal points.

What do you mean? Like the decimal point "." should be aligned like this?

image

Yes.