Summary
XLM amounts from the Stellar network arrive as stroop integers (1 XLM = 10,000,000 stroops). Several endpoints convert stroops to XLM inline with inconsistent decimal handling. A shared stroopsToXlm(stroops: bigint): string helper should centralise the conversion.
Scope
- Add
stroopsToXlm(stroops: bigint): string returning a string with exactly 7 decimal places
- Add unit tests: 10000000 stroops → '1.0000000', 1 stroop → '0.0000001', 0 stroops → '0.0000000'
- Test a large value (e.g. 1000000000000 stroops) does not lose precision
- Replace all inline stroop-to-XLM conversions in existing endpoints with the helper
- Helper must not use floating-point arithmetic (use bigint throughout)
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
XLM amounts from the Stellar network arrive as stroop integers (1 XLM = 10,000,000 stroops). Several endpoints convert stroops to XLM inline with inconsistent decimal handling. A shared
stroopsToXlm(stroops: bigint): stringhelper should centralise the conversion.Scope
stroopsToXlm(stroops: bigint): stringreturning a string with exactly 7 decimal placesAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram