MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatCreditAmount

Function formatCreditAmount

src/services/api/referral.ts:139–144  ·  view source on GitHub ↗
(reward: ReferrerRewardInfo)

Source from the content-addressed store, hash-verified

137}
138
139export function formatCreditAmount(reward: ReferrerRewardInfo): string {
140 const symbol = CURRENCY_SYMBOLS[reward.currency] ?? `${reward.currency} `
141 const amount = reward.amount_minor_units / 100
142 const formatted = amount % 1 === 0 ? amount.toString() : amount.toFixed(2)
143 return `${symbol}${formatted}`
144}
145
146/**
147 * Get cached referrer reward info from eligibility cache

Callers 4

PassesFunction · 0.85
createGuestPassesFeedFunction · 0.85
GuestPassesUpsellFunction · 0.85
tipRegistry.tsFile · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected