(reward: ReferrerRewardInfo)
| 137 | } |
| 138 | |
| 139 | export 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 |
no test coverage detected