From 64ce7abebb6adf1e7cba431b3d4b8ce1f50a30b9 Mon Sep 17 00:00:00 2001 From: Ali Abdulmadzhidov Date: Mon, 16 Oct 2023 20:52:13 +0300 Subject: [PATCH] fix account generation error --- build.gradle | 4 ++-- .../data/repository/CredentialsRepositoryImpl.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 9b669ed92..f02dcd746 100644 --- a/build.gradle +++ b/build.gradle @@ -50,8 +50,8 @@ buildscript { xserializationjson : '1.5.1', ktor : '2.3.1', xbackup : '1.0.0', - xcrypto : '1.0.2', - xsubstrate : '1.0.1' + xcrypto : '1.0.3', + xsubstrate : '1.0.2' ] ext { diff --git a/feature_account_impl/src/main/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryImpl.kt b/feature_account_impl/src/main/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryImpl.kt index e81b51228..e7108fbd2 100644 --- a/feature_account_impl/src/main/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryImpl.kt +++ b/feature_account_impl/src/main/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryImpl.kt @@ -48,6 +48,7 @@ import jp.co.soramitsu.feature_account_api.domain.interfaces.CredentialsReposito import jp.co.soramitsu.feature_blockexplorer_api.data.SoraConfigManager import jp.co.soramitsu.sora.substrate.runtime.RuntimeManager import jp.co.soramitsu.sora.substrate.runtime.SubstrateOptionsProvider +import jp.co.soramitsu.sora.substrate.substrate.deriveSeed32 import jp.co.soramitsu.xcrypto.util.fromHex import jp.co.soramitsu.xcrypto.util.toHexString import jp.co.soramitsu.xsubstrate.encrypt.keypair.substrate.Sr25519Keypair @@ -81,7 +82,7 @@ class CredentialsRepositoryImpl constructor( } private suspend fun generateEntropyAndKeysFromMnemonic(mnemonic: Mnemonic): String { - val derivationResult = SubstrateSeedFactory.deriveSeed(mnemonic.words, null) + val derivationResult = SubstrateSeedFactory.deriveSeed32(mnemonic.words, null) val keyPair = SubstrateKeypairFactory.generate( SubstrateOptionsProvider.encryptionType, derivationResult.seed,