Updated on 2026-08-14
This commit is contained in:
parent
0fb5081daf
commit
314526cbbd
11 changed files with 92 additions and 46 deletions
|
|
@ -72,6 +72,7 @@ internal class YieldSupplyModel @Inject constructor(
|
|||
|
||||
val bottomSheetNavigation: SlotNavigation<Unit> = SlotNavigation()
|
||||
|
||||
private val handleNavigation = params.handleNavigation
|
||||
private val cryptoCurrency = params.cryptoCurrency
|
||||
var userWallet: UserWallet by Delegates.notNull()
|
||||
|
||||
|
|
@ -91,8 +92,13 @@ internal class YieldSupplyModel @Inject constructor(
|
|||
|
||||
init {
|
||||
checkIfYieldSupplyIsAvailable()
|
||||
params.handleNavigation?.let { handle ->
|
||||
if (handle) {
|
||||
|
||||
val protocolStatus = yieldSupplyRepository.getTokenProtocolStatus(
|
||||
userWalletId = params.userWalletId,
|
||||
cryptoCurrency = cryptoCurrency,
|
||||
)
|
||||
if (handleNavigation != null && protocolStatus == null) {
|
||||
if (handleNavigation) {
|
||||
modelScope.launch {
|
||||
delay(timeMillis = 1000)
|
||||
bottomSheetNavigation.activate(Unit)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ private fun SupplyAvailable(supplyUM: YieldSupplyUM.Available, modifier: Modifie
|
|||
modifier = modifier,
|
||||
button = {
|
||||
SecondaryButton(
|
||||
text = stringResourceSafe(R.string.common_get_started),
|
||||
text = stringResourceSafe(R.string.common_learn_more),
|
||||
onClick = supplyUM.onClick,
|
||||
size = TangemButtonSize.WideAction,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue