Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix account generation error #233

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Original file line number Diff line number Diff line change
@@ -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,