Updated on 2026-08-14
This commit is contained in:
parent
5f664dc9fd
commit
ef3fd2969b
4 changed files with 7 additions and 8 deletions
|
|
@ -23,7 +23,7 @@ enum class SettingsElement(
|
|||
WalletConnect(R.drawable.ic_walletconnect, R.string.wallet_connect_title),
|
||||
Chat(R.drawable.ic_chat, R.string.details_chat),
|
||||
SendFeedback(R.drawable.ic_comment, R.string.details_row_title_send_feedback),
|
||||
// ReferralProgram(R.drawable.ic_add_friends, R.string.details_referral_title),
|
||||
ReferralProgram(R.drawable.ic_add_friends, R.string.details_referral_title),
|
||||
CardSettings(R.drawable.ic_card_settings, R.string.card_settings_title),
|
||||
AppCurrency(R.drawable.ic_currency, R.string.details_row_title_currency),
|
||||
AppSettings(R.drawable.ic_settings, R.string.app_settings_title),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class DetailsViewModel(private val store: Store<AppState>) {
|
|||
}
|
||||
SettingsElement.AppSettings -> if (state.appSettingsState.isBiometricsAvailable) it else null
|
||||
SettingsElement.AppCurrency -> if (cardTypesResolver?.isMultiwalletAllowed() != true) it else null
|
||||
// SettingsElement.ReferralProgram -> if (state.scanResponse?.card?.isTangemWallet == true) it else null
|
||||
SettingsElement.ReferralProgram -> if (cardTypesResolver?.isTangemWallet() == true) it else null
|
||||
else -> it
|
||||
}
|
||||
}
|
||||
|
|
@ -93,9 +93,9 @@ class DetailsViewModel(private val store: Store<AppState>) {
|
|||
SettingsElement.PrivacyPolicy -> {
|
||||
// TODO: To be available later
|
||||
}
|
||||
// SettingsElement.ReferralProgram -> {
|
||||
// store.dispatch(NavigationAction.NavigateTo(AppScreen.ReferralProgram))
|
||||
// }
|
||||
SettingsElement.ReferralProgram -> {
|
||||
store.dispatch(NavigationAction.NavigateTo(AppScreen.ReferralProgram))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ data class ReferralResponse(
|
|||
) {
|
||||
|
||||
data class Conditions(
|
||||
@Json(name = "award") val award: Int,
|
||||
@Json(name = "discount") val discount: Discount,
|
||||
@Json(name = "awards") val awards: List<Award>,
|
||||
@Json(name = "tosLink") val tosLink: String,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class ReferralConverter @Inject constructor() : Converter<ReferralResponse, Refe
|
|||
val tokenConverter = TokenConverter()
|
||||
return if (referral != null) {
|
||||
ReferralData.ParticipantData(
|
||||
award = conditions.awards.firstOrNull()?.amount ?: conditions.award,
|
||||
award = conditions.awards.firstOrNull()?.amount ?: 0,
|
||||
discount = conditions.discount.amount,
|
||||
discountType = safeValueOf(conditions.discount.discountType.uppercase(), DiscountType.PERCENTAGE),
|
||||
tosLink = conditions.tosLink,
|
||||
|
|
@ -35,7 +35,7 @@ class ReferralConverter @Inject constructor() : Converter<ReferralResponse, Refe
|
|||
)
|
||||
} else {
|
||||
ReferralData.NonParticipantData(
|
||||
award = conditions.awards.firstOrNull()?.amount ?: conditions.award,
|
||||
award = conditions.awards.firstOrNull()?.amount ?: 0,
|
||||
discount = conditions.discount.amount,
|
||||
discountType = safeValueOf(conditions.discount.discountType.uppercase(), DiscountType.PERCENTAGE),
|
||||
tosLink = conditions.tosLink,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue