You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
[SPIKE] Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module #804
Several of the bugs filed in this batch (stroop rounding, BigInt deep-equal, locale formatting) are all amount/money-handling bugs scattered across different parts of utils, suggesting the current organization makes it easy to introduce subtly inconsistent money-handling logic in different places.
Component
utils
Research Questions
How many distinct places in the codebase implement their own amount parsing/formatting/comparison logic today?
Would consolidating into a single money-focused module (with one well-tested implementation each of parse/format/compare) have prevented the bugs filed in this batch?
What's the migration risk for existing internal callers if the consolidated module's exact output format differs subtly from today's scattered implementations?
Context
Three separate amount-related bugs were filed independently in this same review pass, which is a strong signal the underlying organization (scattered amount logic) is itself the root issue worth addressing.
Proposed Approach
Inventory every amount-related helper and its callers, then design and prototype a consolidated money module covering parse, format, compare, and arithmetic.
Deliverables
An inventory of current amount-handling call sites, plus a prototype consolidated module and a migration plan.
Difficulty
🟡 Medium
Estimated Time
2-3 days
Related Issues
Directly motivated by the stroop-rounding, BigInt deep-equal, and locale-formatting bugs filed separately in this same batch.
I reviewed "[SPIKE] Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module" and would like to work on this.
I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.
I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.
I reviewed the issue for Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module. We need to resolve 'investigate consolidating amount-handling utilities (xlmtostroops, stroopstoxlm, formatamount, deepequal-for-bigint) into one well-tested 'money' module' cleanly across the target modules.
Proposed Implementation:
Trace the current code execution path to isolate the behavior boundary.
Implement a focused, modular fix for 'Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module' adhering strictly to repository architecture.
Ensure defensive guards and backward compatibility are maintained.
Testing & Verification:
I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.
Happy to handle this cleanly. Please assign it over and I'll put together the PR.
Activity
ranjeetprabhatedu-dotcom commentedon Oct 29, 2026
Hello maintainers,
I reviewed "[SPIKE] Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module" and would like to work on this.
I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.
I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.
Thank you!
maxx-GENIUS commentedon Nov 6, 2026
Hey @trustflow-protocol team,
I reviewed the issue for Investigate consolidating amount-handling utilities (xlmToStroops, stroopsToXlm, formatAmount, deepEqual-for-BigInt) into one well-tested 'money' module. We need to resolve 'investigate consolidating amount-handling utilities (xlmtostroops, stroopstoxlm, formatamount, deepequal-for-bigint) into one well-tested 'money' module' cleanly across the target modules.
Proposed Implementation:
Testing & Verification:
I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.
Happy to handle this cleanly. Please assign it over and I'll put together the PR.