Skip to content

Commit f615d50

Browse files
authored
Merge pull request #175 from code-payments/fix/relationship-domain-pass-derivepath-password-if-available
fix(mnemomic): use DerivePath password if provided
2 parents 1511e73 + f110fa0 commit f615d50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/src/main/java/com/getcode/crypt/MnemonicPhrase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MnemonicPhrase(val kind: Kind, val words: List<String>) {
1616

1717
fun getSolanaKeyPair(context: Context, path: DerivePath = DerivePath.primary): Ed25519.KeyPair {
1818
val mnemonicCode = MnemonicCode(context.resources)
19-
val mnemonicSeed = MnemonicCode.toSeed(words, "")
19+
val mnemonicSeed = MnemonicCode.toSeed(words, path.password.orEmpty())
2020
mnemonicCode.check(words)
2121

2222
return Derive.path(mnemonicSeed, path)

0 commit comments

Comments
 (0)