Updated on 2026-08-14
This commit is contained in:
parent
5ba4effe5f
commit
90d157ff37
1 changed files with 5 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package com.tangem.tap.features.wallet.redux.middlewares
|
|||
|
||||
import com.tangem.blockchain.blockchains.ethereum.EthereumWalletManager
|
||||
import com.tangem.blockchain.common.AmountType
|
||||
import com.tangem.tap.common.extensions.dispatchDebugErrorNotification
|
||||
import com.tangem.tap.common.extensions.dispatchOnMain
|
||||
import com.tangem.tap.common.redux.AppState
|
||||
import com.tangem.tap.common.redux.navigation.AppScreen
|
||||
|
|
@ -51,7 +52,10 @@ class TradeCryptoMiddleware {
|
|||
currency is Currency.Token && currency.blockchain.isTestnet()
|
||||
) {
|
||||
val walletManager = store.state.walletState.getWalletManager(currency)
|
||||
if (walletManager !is EthereumWalletManager) return
|
||||
if (walletManager !is EthereumWalletManager) {
|
||||
store.dispatchDebugErrorNotification("Testnet tokens available only for the ETH")
|
||||
return
|
||||
}
|
||||
|
||||
scope.launch { exchangeManager.buyErc20Tokens(walletManager, currency.token) }
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue