Skip to content

refactor: consolidate stroopsToXlm into stellar-format.ts and add precision test - #248

Open
Tekh134 wants to merge 4 commits into
StellarState:devfrom
Tekh134:feature/issue-185-stroops-to-xlm
Open

refactor: consolidate stroopsToXlm into stellar-format.ts and add precision test#248
Tekh134 wants to merge 4 commits into
StellarState:devfrom
Tekh134:feature/issue-185-stroops-to-xlm

Conversation

@Tekh134

@Tekh134 Tekh134 commented Aug 26, 2026

Copy link
Copy Markdown

Consolidates the stroopsToXlm helper into the canonical bigint-based implementation in src/lib/stellar-format.ts.

  • Removes the duplicate Decimal.js-based stroopsToXlm from src/utils/unit-conversion.utils.ts
  • Re-exports stroopsToXlm from stellar-format.ts for backward compatibility
  • Adds explicit test for 1,000,000,000,000 stroops (100,000 XLM) in stellar-format.test.ts
  • Updates unit-conversion tests to import from the canonical implementation
  • Ensures all stroop-to-XLM conversions use bigint arithmetic throughout

Closes #185

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@Tekh134 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add helper for converting a Stellar stroop amount to a human-readable XLM string with correct decimal places

2 participants