(reward: ReferrerRewardInfo)
| 152 | } |
| 153 | |
| 154 | export function formatCreditAmount(reward: ReferrerRewardInfo): string { |
| 155 | const symbol = CURRENCY_SYMBOLS[reward.currency] ?? `${reward.currency} ` |
| 156 | const amount = reward.amount_minor_units / 100 |
| 157 | const formatted = amount % 1 === 0 ? amount.toString() : amount.toFixed(2) |
| 158 | return `${symbol}${formatted}` |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Get cached referrer reward info from eligibility cache |
no test coverage detected