Updated on 2026-08-14
This commit is contained in:
parent
abec0f1ee8
commit
a2b3c22e53
17 changed files with 85 additions and 224 deletions
|
|
@ -9,6 +9,7 @@ import com.tangem.domain.common.util.UserWalletId
|
|||
import com.tangem.tap.common.analytics.converters.TopUpEventConverter
|
||||
import com.tangem.tap.common.analytics.events.AnalyticsParam
|
||||
import com.tangem.tap.common.extensions.copy
|
||||
import com.tangem.tap.domain.model.TotalFiatBalance
|
||||
import com.tangem.tap.domain.model.UserWallet
|
||||
import com.tangem.tap.domain.model.WalletDataModel
|
||||
import com.tangem.tap.domain.model.WalletStoreModel
|
||||
|
|
@ -17,7 +18,6 @@ import com.tangem.tap.domain.tokens.models.BlockchainNetwork
|
|||
import com.tangem.tap.domain.walletCurrencies.WalletCurrenciesManager
|
||||
import com.tangem.tap.domain.walletStores.WalletStoresManager
|
||||
import com.tangem.tap.features.wallet.models.Currency
|
||||
import com.tangem.tap.features.wallet.redux.ProgressState
|
||||
import com.tangem.tap.persistence.ToppedUpWalletStorage
|
||||
import com.tangem.tap.scope
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -60,8 +60,8 @@ class TopUpController(
|
|||
hadMissedDerivations = blockchains.isNotEmpty()
|
||||
}
|
||||
|
||||
fun totalBalanceStateChanged(state: ProgressState) {
|
||||
if (state == ProgressState.Done) tryToSend()
|
||||
fun totalBalanceStateChanged(totalFiatBalance: TotalFiatBalance) {
|
||||
if (totalFiatBalance is TotalFiatBalance.Loaded) tryToSend()
|
||||
}
|
||||
|
||||
fun loadDataSuccess() {
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ import com.tangem.tap.common.TestActions
|
|||
import com.tangem.tap.domain.TapError
|
||||
import com.tangem.tap.domain.extensions.amountToCreateAccount
|
||||
import com.tangem.tap.domain.getFirstToken
|
||||
import com.tangem.tap.domain.model.WalletDataModel
|
||||
import com.tangem.tap.features.demo.isDemoCard
|
||||
import com.tangem.tap.features.wallet.models.Currency
|
||||
import com.tangem.tap.features.wallet.redux.AddressData
|
||||
import com.tangem.tap.features.wallet.redux.reducers.createAddressesData
|
||||
import com.tangem.tap.network.exchangeServices.CurrencyExchangeManager
|
||||
import com.tangem.tap.proxy.redux.DaggerGraphState
|
||||
|
|
@ -81,7 +80,7 @@ fun WalletManager.getTopUpUrl(): String? {
|
|||
)
|
||||
}
|
||||
|
||||
fun WalletManager?.getAddressData(): AddressData? {
|
||||
fun WalletManager?.getAddressData(): WalletDataModel.AddressData? {
|
||||
val wallet = this?.wallet ?: return null
|
||||
|
||||
val addressDataList = wallet.createAddressesData()
|
||||
|
|
@ -100,11 +99,6 @@ fun <T> WalletManager.Companion.stub(): T {
|
|||
} as T
|
||||
}
|
||||
|
||||
fun Wallet.getTxHistory(currency: Currency): List<TransactionData> {
|
||||
return (currency as? Currency.Token)?.let { this.getTokenTxHistory(it.token) }
|
||||
?: getBlockchainTxHistory()
|
||||
}
|
||||
|
||||
fun Wallet.getBlockchainTxHistory(): List<TransactionData> {
|
||||
return historyTransactions.filter {
|
||||
it.contractAddress.isNullOrEmpty()
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.tangem.tap.common.redux
|
|||
|
||||
import com.tangem.common.extensions.VoidCallback
|
||||
import com.tangem.tap.common.TestAction
|
||||
import com.tangem.tap.domain.model.WalletDataModel
|
||||
import com.tangem.tap.features.wallet.models.Currency
|
||||
import com.tangem.tap.features.wallet.redux.AddressData
|
||||
|
||||
/**
|
||||
[REDACTED_AUTHOR]
|
||||
|
|
@ -24,7 +24,7 @@ sealed class AppDialog : StateDialog {
|
|||
|
||||
data class AddressInfoDialog(
|
||||
val currency: Currency,
|
||||
val addressData: AddressData,
|
||||
val addressData: WalletDataModel.AddressData,
|
||||
) : AppDialog()
|
||||
|
||||
data class TestActionsDialog(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue