Updated on 2026-08-14

This commit is contained in:
Tangem 2022-12-28 12:37:32 +03:00
parent 80bfc4444a
commit f7b0479994
2 changed files with 3 additions and 2 deletions

View file

@ -107,9 +107,9 @@ internal class ReferralViewModel @Inject constructor(
private fun ReferralData.getDiscountValue(): String {
val discountSymbol = when (discountType) {
DiscountType.PERCENTAGE -> "%"
DiscountType.VALUE -> error("Value doesn't support")
DiscountType.VALUE -> this.getToken().symbol
}
return "$discount $discountSymbol"
return "$discount$discountSymbol"
}
private fun ReferralData.getToken() = requireNotNull(tokens.firstOrNull()) { "Token list is empty" }