Join our community: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
A separate testing issue notes the create-stream wizard imports lib/amount.ts while only utils/amount.ts has test coverage, implying two independent amount-formatting implementations exist. Regardless of which one gets tests first, having two parallel utilities for the same concern (formatting/parsing token amounts) is itself a maintenance risk: a bug fixed in one won't be fixed in the other, and new code has a 50/50 chance of importing the wrong one.
Acceptance criteria
Files to touch
frontend/src/utils/amount.ts
frontend/src/lib/amount.ts
Out of scope
- Adding the missing test coverage itself (tracked separately)
- Changing the amount formatting rules/precision
Why this matters
A separate testing issue notes the create-stream wizard imports
lib/amount.tswhile onlyutils/amount.tshas test coverage, implying two independent amount-formatting implementations exist. Regardless of which one gets tests first, having two parallel utilities for the same concern (formatting/parsing token amounts) is itself a maintenance risk: a bug fixed in one won't be fixed in the other, and new code has a 50/50 chance of importing the wrong one.Acceptance criteria
frontend/src/utils/amount.tsandfrontend/src/lib/amount.tsfor behavioral differencesFiles to touch
frontend/src/utils/amount.tsfrontend/src/lib/amount.tsOut of scope