Updated on 2026-08-14
This commit is contained in:
parent
45ab6836ad
commit
5c56f04c38
52 changed files with 228 additions and 72 deletions
|
|
@ -87,7 +87,7 @@ private fun GiveTxPermissionBottomSheetContent(content: GiveTxPermissionBottomSh
|
|||
|
||||
PrimaryButtonIconEnd(
|
||||
text = stringResourceSafe(id = R.string.common_approve),
|
||||
iconResId = R.drawable.ic_tangem_24,
|
||||
iconResId = content.walletInteractionIcon,
|
||||
showProgress = data.approveButton.loading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
|
@ -319,5 +319,6 @@ private val previewData = GiveTxPermissionBottomSheetConfig(
|
|||
dialogText = resourceReference(R.string.give_permission_staking_footer),
|
||||
footerText = resourceReference(R.string.swap_give_permission_fee_footer),
|
||||
),
|
||||
walletInteractionIcon = R.drawable.ic_tangem_24,
|
||||
onCancel = {},
|
||||
)
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
package com.tangem.common.ui.bottomsheet.permission.state
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent
|
||||
|
||||
data class GiveTxPermissionBottomSheetConfig(
|
||||
val data: GiveTxPermissionState.ReadyForRequest,
|
||||
@DrawableRes val walletInteractionIcon: Int?,
|
||||
val onCancel: () -> Unit,
|
||||
) : TangemBottomSheetConfigContent
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.tangem.common.ui.userwallet.ext
|
||||
|
||||
import com.tangem.common.ui.R
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
|
||||
fun walletInterationIcon(userWallet: UserWallet): Int? {
|
||||
return when (userWallet) {
|
||||
is UserWallet.Cold -> R.drawable.ic_tangem_24
|
||||
is UserWallet.Hot -> null
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue