Updated on 2026-08-14
This commit is contained in:
parent
80bfc4444a
commit
f7b0479994
2 changed files with 3 additions and 2 deletions
|
|
@ -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" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue