Updated on 2026-08-14

This commit is contained in:
Tangem 2023-03-08 19:16:58 +03:00
parent dc383831d3
commit 6b95243f9a
4 changed files with 36 additions and 14 deletions

View file

@ -59,12 +59,19 @@ class DerivationManagerImpl(
}
}
override fun hasDerivation(networkId: String): Boolean {
override fun getDerivationPathForBlockchain(networkId: String): String? {
val scanResponse = appStateHolder.scanResponse
val blockchain = Blockchain.fromNetworkId(networkId)
if (scanResponse != null && blockchain != null) {
return blockchain.derivationPath(appStateHolder.getActualCard()?.derivationStyle)?.rawPath
}
return null
}
override fun hasDerivation(networkId: String, derivationPath: String): Boolean {
val scanResponse = appStateHolder.scanResponse
val blockchain = Blockchain.fromNetworkId(networkId)
if (scanResponse != null && blockchain != null) {
val derivationPath = blockchain.derivationPath(appStateHolder.getActualCard()?.derivationStyle)?.rawPath
if (derivationPath.isNullOrEmpty()) return false
return scanResponse.hasDerivation(
blockchain,
derivationPath,