Updated on 2026-08-14
This commit is contained in:
parent
a3a18854c8
commit
92794cb2f6
14 changed files with 35 additions and 13 deletions
|
|
@ -14,7 +14,6 @@ import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
|||
import com.tangem.domain.tokens.model.TokenActionsState
|
||||
import com.tangem.domain.txhistory.usecase.GetExplorerTransactionUrlUseCase
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import com.tangem.domain.wallets.usecase.GetUserWalletUseCase
|
||||
import com.tangem.feature.wallet.presentation.wallet.domain.OnrampStatusFactory
|
||||
import com.tangem.feature.wallet.presentation.wallet.domain.unwrap
|
||||
|
|
@ -59,7 +58,7 @@ internal interface WalletContentClickIntents {
|
|||
|
||||
fun onDisposeExpressStatus()
|
||||
|
||||
fun onNFTClick(userWalletId: UserWalletId)
|
||||
fun onNFTClick(userWallet: UserWallet)
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
|
|
@ -242,7 +241,7 @@ internal class WalletContentClickIntentsImplementor @Inject constructor(
|
|||
stateHolder.update(CloseBottomSheetTransformer(userWalletId))
|
||||
}
|
||||
|
||||
override fun onNFTClick(userWalletId: UserWalletId) {
|
||||
override fun onNFTClick(userWallet: UserWallet) {
|
||||
val selectedWallet = stateHolder.getSelectedWallet() as? WalletState.MultiCurrency.Content ?: return
|
||||
val analyticsState = when (val nftState = selectedWallet.nftState) {
|
||||
is WalletNFTItemUM.Content -> NFTAnalyticsEvent.NFTListScreenOpened.State.Full(nftState.assetsCount)
|
||||
|
|
@ -256,6 +255,6 @@ internal class WalletContentClickIntentsImplementor @Inject constructor(
|
|||
analyticsEventHandler.send(NFTAnalyticsEvent.NFTListScreenOpened(analyticsState))
|
||||
}
|
||||
|
||||
router.openNFT(userWalletId)
|
||||
router.openNFT(userWallet)
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ import com.tangem.domain.models.scan.ScanResponse
|
|||
import com.tangem.domain.redux.ReduxStateHolder
|
||||
import com.tangem.domain.redux.StateDialog
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import com.tangem.feature.wallet.navigation.WalletRoute
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletDialogConfig
|
||||
|
|
@ -116,7 +117,12 @@ internal class DefaultWalletRouter @Inject constructor(
|
|||
reduxStateHolder.dispatchDialogShow(StateDialog.ScanFailsDialog(StateDialog.ScanFailsSource.MAIN, onTryAgain))
|
||||
}
|
||||
|
||||
override fun openNFT(userWalletId: UserWalletId) {
|
||||
router.push(AppRoute.NFT(userWalletId))
|
||||
override fun openNFT(userWallet: UserWallet) {
|
||||
router.push(
|
||||
AppRoute.NFT(
|
||||
userWalletId = userWallet.walletId,
|
||||
walletName = userWallet.name,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import androidx.compose.runtime.Stable
|
|||
import com.arkivanov.decompose.router.slot.SlotNavigation
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import com.tangem.feature.wallet.navigation.WalletRoute
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletDialogConfig
|
||||
|
|
@ -58,5 +59,5 @@ internal interface InnerWalletRouter {
|
|||
fun openScanFailedDialog(onTryAgain: () -> Unit)
|
||||
|
||||
/** Open NFT collections screen */
|
||||
fun openNFT(userWalletId: UserWalletId)
|
||||
fun openNFT(userWallet: UserWallet)
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ internal class WalletNFTListSubscriber(
|
|||
SetNFTCollectionsTransformer(
|
||||
userWalletId = userWallet.walletId,
|
||||
nftCollections = it,
|
||||
onItemClick = { clickIntents.onNFTClick(userWallet.walletId) },
|
||||
onItemClick = { clickIntents.onNFTClick(userWallet) },
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue