Updated on 2026-08-14
This commit is contained in:
parent
ebcf2f40e5
commit
dca991651c
13 changed files with 173 additions and 15 deletions
|
|
@ -8,15 +8,14 @@ import com.tangem.lib.crypto.DerivationManager
|
|||
import com.tangem.lib.crypto.models.Currency
|
||||
import com.tangem.lib.crypto.models.NonNativeToken
|
||||
import com.tangem.tap.domain.tokens.models.BlockchainNetwork
|
||||
import com.tangem.tap.features.tokens.redux.TokensMiddleware
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
|
||||
class DerivationManagerImpl(
|
||||
private val tokesMiddleware: TokensMiddleware,
|
||||
private val appStateHolder: AppStateHolder,
|
||||
) : DerivationManager {
|
||||
|
||||
override suspend fun deriveMissingBlockchains(currency: Currency) = suspendCoroutine<Boolean> { continuation ->
|
||||
val tokesMiddleware = requireNotNull(appStateHolder.tokesMiddleware) { "tokesMiddleware is null" }
|
||||
val blockchain = Blockchain.fromNetworkId(currency.networkId)
|
||||
val card = appStateHolder.getActualCard()
|
||||
if (blockchain != null && card != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue