Updated on 2026-08-14

This commit is contained in:
Tangem 2023-04-19 16:46:04 +03:00
commit de9fe0d310
3 changed files with 13 additions and 5 deletions

View file

@ -157,6 +157,10 @@ internal fun WalletDataModel.updateWithSelf(newWalletData: WalletDataModel): Wal
-> newStatus
},
existentialDeposit = newWalletData.existentialDeposit,
walletAddresses = newWalletData.walletAddresses?.copy(
selectedAddress = oldWalletData.walletAddresses?.selectedAddress
?: newWalletData.walletAddresses.selectedAddress,
),
fiatRate = newWalletData.fiatRate ?: oldWalletData.fiatRate,
)
}

View file

@ -14,10 +14,10 @@ import com.tangem.tap.common.extensions.hide
import com.tangem.tap.common.extensions.show
import com.tangem.tap.domain.model.WalletDataModel
import com.tangem.tap.features.wallet.redux.WalletAction
import com.tangem.tap.features.wallet.ui.images.load
import com.tangem.tap.features.wallet.ui.utils.getFormattedAmount
import com.tangem.tap.features.wallet.ui.utils.getFormattedFiatAmount
import com.tangem.tap.features.wallet.ui.utils.getFormattedFiatRate
import com.tangem.tap.features.wallet.ui.images.load
import com.tangem.tap.store
import com.tangem.wallet.R
import com.tangem.wallet.databinding.ItemCurrencyWalletBinding
@ -96,9 +96,13 @@ class WalletAdapter : ListAdapter<WalletDataModel, WalletAdapter.WalletsViewHold
noRateValue = root.getString(id = R.string.token_item_no_rate),
)
cardWallet.setOnClickListener {
Analytics.send(Portfolio.TokenTapped())
store.dispatch(WalletAction.MultiWallet.SelectWallet(wallet.currency))
if (wallet.walletAddresses != null) {
cardWallet.setOnClickListener {
Analytics.send(Portfolio.TokenTapped())
store.dispatch(WalletAction.MultiWallet.SelectWallet(wallet.currency))
}
} else {
cardWallet.setOnClickListener(null)
}
}
}

View file

@ -73,7 +73,7 @@ kotlinSerialization = "1.4.1"
# region Tangem
tangemBlockchainSdk = "develop-203"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-218"
tangemCardSdk = "develop-221"
# tangemCardSdk = "0.0.1" # Keep it! - used for local builds
# endregion Tangem