Skip to content

Commit 4980e18

Browse files
committed
docs(subscriptions): fix stale tier-config ledger comment
The tierGrant docstring still claimed allotments 'do NOT write to the ledger' and are 'derived at read time' — true under the old Option-B model, false since the single-ledger migration (#324). grantSubscriptionPeriod now materializes this amount into the wallet as a real sub_grant row. Correct the comment to match; the value still also frames iOS monthlyGrant.
1 parent 7b11e05 commit 4980e18

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/subscriptions/tier-config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ const parsePositiveInt = (key: string, raw: string | undefined): number => {
1414
};
1515

1616
/**
17-
* Per-tier monthly credit allotment, env-driven.
17+
* Per-tier per-period credit allotment, env-driven.
1818
*
19-
* These values are the source of truth for `monthlyGrant` in the iOS
20-
* `CreditBalance` model. They do NOT write to the ledger — subscription
21-
* allotments are derived (Subscription row + this config) at read time.
19+
* Single-ledger model: `grantSubscriptionPeriod` writes this amount into the
20+
* wallet as a real `sub_grant` credit row on subscribe/renewal — balances are
21+
* materialized, never derived at read time. The same value also frames
22+
* `monthlyGrant` in the iOS `CreditBalance` model.
2223
*
2324
* Annual subscriptions inherit the monthly amount per period; the renewal
2425
* cycle is just 12× longer. iOS displays `monthlyGrant` either way; the

0 commit comments

Comments
 (0)