Skip to content

Commit f110fa0

Browse files
committed
fix(mnemomic): use DerivePath password if provided
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 1511e73 commit f110fa0

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)