Commit 5dabe7c
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 185f1ac commit 5dabe7c
5 files changed
Lines changed: 1627 additions & 230 deletions
File tree
- packages/billing/src
- __tests__
0 commit comments