Skip to content

Add unit tests for the XLM price formatter rendering the correct number of decimal places across different values #766

Description

@Chucks1093

Summary

XLM prices are displayed throughout the app with two decimal places. Unit tests should confirm the formatter handles whole numbers, fractional values, and very small values without floating-point rounding errors.

Scope

  • Test 10 XLM formats as '10.00 XLM'
  • Test 0.5 XLM formats as '0.50 XLM'
  • Test 0.001 XLM formats as '0.00 XLM' (rounded to 2 dp)
  • Test 1000.999 XLM formats as '1001.00 XLM'
  • Test 0 XLM formats as '0.00 XLM'

Acceptance Criteria

  • Whole number formatted with two decimal places
  • Fractional value formatted correctly
  • Very small value rounded to 2dp without crashing
  • Zero formatted as '0.00 XLM'

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions