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

multi: use average rate for market order rate display #2463

Merged
merged 9 commits into from
Sep 6, 2023

Conversation

ukane-philemon
Copy link
Contributor

@ukane-philemon ukane-philemon commented Aug 4, 2023

The rate display for market orders on the orders, order and 'market'(on the "user-order card") page, including the Actual Rate field when exporting a market order, will use the average order rate instead of just zero or market. Closes #1969.

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rate is showing 0 on the markets page.

Screenshot 2023-08-06 at 3 19 51 AM

@ukane-philemon
Copy link
Contributor Author

Rate is showing 0 on the markets page.

Screenshot 2023-08-06 at 3 19 51 AM

Thanks for testing. This might be possible if the match rate is zero(which should not be possible for testnet/mainnet/simnet). Please how can I reproduce this exact market order(I'm assuming this is simnet, no)?

@JoeGruffins
Copy link
Member

I see it too. The match card does not update until I refresh the page, and then the rate shows.

@martonp
Copy link
Contributor

martonp commented Aug 7, 2023

Please how can I reproduce this exact market order(I'm assuming this is simnet, no)?

Just open a buy limit order then open a market sell.

@ukane-philemon ukane-philemon force-pushed the show-average-market-rate branch from 9bede4e to 7c27a0b Compare August 8, 2023 17:15
client/webserver/site/src/js/orderutil.ts Outdated Show resolved Hide resolved
client/webserver/site/src/js/markets.ts Outdated Show resolved Hide resolved
client/core/helpers.go Show resolved Hide resolved
client/core/helpers.go Outdated Show resolved Hide resolved
client/core/helpers.go Outdated Show resolved Hide resolved
@ukane-philemon ukane-philemon force-pushed the show-average-market-rate branch 3 times, most recently from 3668440 to a76f473 Compare August 19, 2023 18:22
@martonp
Copy link
Contributor

martonp commented Aug 21, 2023

Before I place a market order I see the following in the screen:
Screenshot 2023-08-21 at 5 22 48 AM

Then I place a market sell order, and I see just this row, and it is not clickable. Once there is a match, the other rows come back and it becomes a normal clickable row.
Screenshot 2023-08-21 at 5 22 57 AM

@ukane-philemon
Copy link
Contributor Author

Before I place a market order I see the following in the screen: Screenshot 2023-08-21 at 5 22 48 AM

Then I place a market sell order, and I see just this row, and it is not clickable. Once there is a match, the other rows come back and it becomes a normal clickable row. Screenshot 2023-08-21 at 5 22 57 AM

I'm unable to reproduce this @martonp, Is anyone else seeing this?

@martonp
Copy link
Contributor

martonp commented Aug 22, 2023

Screen.Recording.2023-08-22.at.8.28.46.AM.mov

@ukane-philemon
Copy link
Contributor Author

@martonp, I was able to reproduce the mishap you noticed and it has been fixed in d265f2b.

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ukane-philemon ukane-philemon force-pushed the show-average-market-rate branch from d265f2b to 89b6712 Compare August 28, 2023 19:25
@buck54321
Copy link
Member

Ready but needs a rebase.

Signed-off-by: Philemon Ukane <[email protected]>
Signed-off-by: Philemon Ukane <[email protected]>
Signed-off-by: Philemon Ukane <[email protected]>
Signed-off-by: Philemon Ukane <[email protected]>
Signed-off-by: Philemon Ukane <[email protected]>
@ukane-philemon
Copy link
Contributor Author

@buck54321, do you want me to squash?

Signed-off-by: Philemon Ukane <[email protected]>
@ukane-philemon ukane-philemon force-pushed the show-average-market-rate branch from 89b6712 to cfb036a Compare September 6, 2023 22:31
@buck54321
Copy link
Member

@buck54321, do you want me to squash?

Nah. I'll squash when I merge.

@buck54321 buck54321 merged commit de362bf into decred:master Sep 6, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Market order rate can display average value
4 participants