Updated on 2026-08-14
This commit is contained in:
parent
80bfc4444a
commit
f7b0479994
2 changed files with 3 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ class DetailsViewModel(private val store: Store<AppState>) {
|
|||
SettingsElement.AppSettings -> if (state.isBiometricsAvailable) it else null
|
||||
SettingsElement.AppCurrency -> if (state.scanResponse?.card?.isMultiwalletAllowed != true) it else null
|
||||
SettingsElement.TermsOfUse -> if (state.scanResponse?.card?.isStart2Coin == true) it else null
|
||||
SettingsElement.ReferralProgram -> if (state.scanResponse?.card?.isMultiwalletAllowed == true) it else null
|
||||
else -> it
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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