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

Truncate M values in Trading History #2364

Merged
merged 6 commits into from
May 23, 2023
Merged

Truncate M values in Trading History #2364

merged 6 commits into from
May 23, 2023

Conversation

LeifuChen
Copy link
Contributor

@LeifuChen LeifuChen commented May 22, 2023

Description

We should truncate values over >1.000.000 to 1.00M in the trading history so that the trading history is readable.

Related issue

closes Kwenta/kwenta-private#95

Motivation and Context

How Has This Been Tested?

  1. Open the futures page and check the truncated value of trade history table

Screenshots (if appropriate):

image

@vercel
Copy link

vercel bot commented May 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
kwenta ✅ Ready (Inspect) Visit Preview May 23, 2023 6:57pm
kwenta-storybook ✅ Ready (Inspect) Visit Preview May 23, 2023 6:57pm

@LeifuChen LeifuChen requested a review from platschi May 22, 2023 11:09
avclarke
avclarke previously approved these changes May 23, 2023
@avclarke avclarke self-requested a review May 23, 2023 06:51
Copy link
Contributor

@avclarke avclarke left a comment

Choose a reason for hiding this comment

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

@LeifuChen the spec mentions 1M and above but the screenshots shows also thousands being truncated, do we need to make it only truncate 1M and above?

@platschi
Copy link
Collaborator

platschi commented May 23, 2023

@LeifuChen the spec mentions 1M and above but the screenshots shows also thousands being truncated, do we need to make it only truncate 1M and above?

Good catch, I think we should only truncate 1.00M and upwards in the Trades History table, truncating thousands does not look very useful:

Screenshot 2023-05-23 at 09 09 33

@LeifuChen
Copy link
Contributor Author

@LeifuChen the spec mentions 1M and above but the screenshots shows also thousands being truncated, do we need to make it only truncate 1M and above?

Thanks. I will update the logic.

@platschi platschi merged commit a8ef374 into dev May 23, 2023
@avclarke avclarke deleted the feat/truncate-big-number branch June 12, 2023 17:49
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.

3 participants