Commit 70fdc5f
committed
refactor(billing): consolidate billing duplication (Commit 2.4)
- Create billing-core.ts with shared billing logic
- Extract calculateUsageAndBalanceFromGrants, getOrderedActiveGrantsForOwner
- Add GRANT_ORDER_BY constant for consistent grant ordering
- Update balance-calculator.ts and org-billing.ts to delegate to core
- Add comprehensive unit tests for billing calculations1 parent 5eb6869 commit 70fdc5f
File tree
5 files changed
+1627
-230
lines changed- packages/billing/src
- __tests__
5 files changed
+1627
-230
lines changed
0 commit comments