Skip to content

fix: Add comma formatting to size display values#123

Open
onchito-walks wants to merge 1 commit into
capofficial:mainfrom
onchito-walks:fix-close-size-formatting
Open

fix: Add comma formatting to size display values#123
onchito-walks wants to merge 1 commit into
capofficial:mainfrom
onchito-walks:fix-close-size-formatting

Conversation

@onchito-walks
Copy link
Copy Markdown

Implementation

Fixed the "Size to close is not well formatted, sometimes" bug by adding proper comma formatting to all display paths in formatForDisplay().

Changes

  • Added addCommas() helper function for formatting numbers with thousand separators
  • Updated formatForDisplay() to wrap all return paths through addCommas()

Before

  • 5000 → "5000"
  • 15000.50 → "15000.5"
  • 123456 → "123456"

After

  • 5000 → "5,000"
  • 15000.50 → "15,000.50"
  • 123456 → "123,456"

Payment

BTC: 1Ast5dKr9z1bLWFBnyh6WDQSgyL7EHJosp

- Added addCommas() helper for formatting numbers with comma separators
- Updated formatForDisplay() to use addCommas() for all return paths
- Fixed 'Size to close is not well formatted' bug for amounts >= 1000 or with decimal places
- Large position sizes now display as 5,000.00 instead of just 5000

Bounty: capofficial#11
Payment: 1Ast5dKr9z1bLWFBnyh6WDQSgyL7EHJosp
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.

1 participant