Updated on 2026-08-14
This commit is contained in:
parent
06d139362e
commit
f18338ff44
8 changed files with 139 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.data.managetokens
|
||||
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.blockchainsdk.utils.fromNetworkId
|
||||
import com.tangem.blockchainsdk.compatibility.l2BlockchainsCoinIds
|
||||
import com.tangem.blockchainsdk.utils.isSupportedInApp
|
||||
import com.tangem.blockchainsdk.utils.toNetworkId
|
||||
|
|
@ -193,6 +194,21 @@ internal class DefaultManageTokensRepository(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun checkCurrencyUnsupportedState(
|
||||
userWalletId: UserWalletId,
|
||||
rawNetworkId: String,
|
||||
isMainNetwork: Boolean,
|
||||
): CurrencyUnsupportedState? {
|
||||
val userWallet = getUserWallet(userWalletId = userWalletId)
|
||||
val blockchain = Blockchain.fromNetworkId(networkId = rawNetworkId)
|
||||
?: error("Can not create blockchain with given networkId -> $rawNetworkId")
|
||||
return if (isMainNetwork) {
|
||||
checkBlockchainUnsupportedState(userWallet, blockchain)
|
||||
} else {
|
||||
checkTokenUnsupportedState(userWallet, blockchain)
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkBlockchainUnsupportedState(
|
||||
userWallet: UserWallet,
|
||||
blockchain: Blockchain,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue