Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-31 17:32:32 +03:00
parent dadcea496b
commit eebf4b6915
2 changed files with 9 additions and 13 deletions

View file

@ -91,20 +91,16 @@ private fun makePublicKey(
// we should generate second key for cardano
// because cardano address generation for wallet2 requires keys from 2 derivations
// https://developers.cardano.org/docs/get-started/cardano-serialization-lib/generating-keys/
if (blockchain == Blockchain.Cardano) {
CardanoAddressConfig.useExtendedAddressing = isWallet2
if (blockchain == Blockchain.Cardano && isWallet2) {
val extendedDerivationPath = CardanoUtils.extendedDerivationPath(derivationPath)
val secondDerivedKey = derivedWalletKeys[extendedDerivationPath] ?: error("No derivation found")
if (isWallet2) {
val extendedDerivationPath = CardanoUtils.extendedDerivationPath(derivationPath)
val secondDerivedKey = derivedWalletKeys[extendedDerivationPath] ?: error("No derivation found")
val secondDerivationKey = Wallet.HDKey(secondDerivedKey, extendedDerivationPath)
val secondDerivationKey = Wallet.HDKey(secondDerivedKey, extendedDerivationPath)
return Wallet.PublicKey(
seedKey = seedKey,
derivationType = Wallet.PublicKey.DerivationType.Double(derivationKey, secondDerivationKey),
)
}
return Wallet.PublicKey(
seedKey = seedKey,
derivationType = Wallet.PublicKey.DerivationType.Double(derivationKey, secondDerivationKey),
)
}
return Wallet.PublicKey(

View file

@ -80,7 +80,7 @@ okHttp-prettyLogging = "3.1.0"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "develop-338"
tangemBlockchainSdk = "develop-340"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-293"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds