Updated on 2026-08-14
This commit is contained in:
parent
c407e854fc
commit
ff309ded1a
2 changed files with 8 additions and 1 deletions
|
|
@ -31,6 +31,12 @@ val CardDTO.isMultiwalletAllowed: Boolean
|
||||||
val CardDTO.isHdWalletAllowedByApp: Boolean
|
val CardDTO.isHdWalletAllowedByApp: Boolean
|
||||||
get() = settings.isHDWalletAllowed && !isSaltPay
|
get() = settings.isHDWalletAllowed && !isSaltPay
|
||||||
|
|
||||||
|
val CardDTO.isTangemWallet: Boolean
|
||||||
|
get() = settings.isBackupAllowed
|
||||||
|
&& settings.isHDWalletAllowed
|
||||||
|
&& firmwareVersion >= FirmwareVersion.MultiWalletAvailable
|
||||||
|
&& !isSaltPay
|
||||||
|
|
||||||
fun CardDTO.hasSignedHashes(): Boolean {
|
fun CardDTO.hasSignedHashes(): Boolean {
|
||||||
return wallets.any { (it.totalSignedHashes ?: 0) > 0 }
|
return wallets.any { (it.totalSignedHashes ?: 0) > 0 }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.tangem.tap.common.redux.global.GlobalAction
|
||||||
import com.tangem.tap.common.redux.navigation.AppScreen
|
import com.tangem.tap.common.redux.navigation.AppScreen
|
||||||
import com.tangem.tap.common.redux.navigation.NavigationAction
|
import com.tangem.tap.common.redux.navigation.NavigationAction
|
||||||
import com.tangem.tap.domain.extensions.isMultiwalletAllowed
|
import com.tangem.tap.domain.extensions.isMultiwalletAllowed
|
||||||
|
import com.tangem.tap.domain.extensions.isTangemWallet
|
||||||
import com.tangem.tap.features.details.redux.DetailsAction
|
import com.tangem.tap.features.details.redux.DetailsAction
|
||||||
import com.tangem.tap.features.details.redux.DetailsState
|
import com.tangem.tap.features.details.redux.DetailsState
|
||||||
import com.tangem.tap.features.disclaimer.redux.DisclaimerAction
|
import com.tangem.tap.features.disclaimer.redux.DisclaimerAction
|
||||||
|
|
@ -39,7 +40,7 @@ class DetailsViewModel(private val store: Store<AppState>) {
|
||||||
SettingsElement.AppSettings -> if (state.isBiometricsAvailable) it else null
|
SettingsElement.AppSettings -> if (state.isBiometricsAvailable) it else null
|
||||||
SettingsElement.AppCurrency -> if (state.scanResponse?.card?.isMultiwalletAllowed != true) 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.TermsOfUse -> if (state.scanResponse?.card?.isStart2Coin == true) it else null
|
||||||
SettingsElement.ReferralProgram -> if (state.scanResponse?.card?.isMultiwalletAllowed == true) it else null
|
SettingsElement.ReferralProgram -> if (state.scanResponse?.card?.isTangemWallet == true) it else null
|
||||||
else -> it
|
else -> it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue