Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-13 16:20:59 +04:00
parent 23264bc7f0
commit 8c37dbd5b0
31 changed files with 422 additions and 121 deletions

View file

@ -1,5 +1,6 @@
package com.tangem.data.common.currency
import com.tangem.blockchain.blockchains.ethereum.Chain
import com.tangem.blockchain.common.Blockchain
import com.tangem.blockchainsdk.utils.ExcludedBlockchains
import com.tangem.blockchainsdk.utils.fromNetworkId
@ -73,6 +74,17 @@ class CryptoCurrencyFactory(
)
}
fun createCoin(chainId: Int, extraDerivationPath: String?, userWallet: UserWallet): CryptoCurrency.Coin? {
val blockchain: Blockchain? = Chain.entries.find { it.id == chainId }?.blockchain
return if (blockchain != null) {
createCoin(blockchain, extraDerivationPath, userWallet)
} else {
Timber.e("Unable to get blockchain from chainId == $chainId")
null
}
}
fun createCoin(
blockchain: Blockchain,
extraDerivationPath: String?,