Fix empty recovery password error

pull/1554/head
Andrew 10 months ago
parent eb63af2f8d
commit 8cc7e65abf

@ -83,8 +83,8 @@ class MnemonicCodec(private val loadFileContents: (String) -> String) {
val prefixLength = languageConfiguration.prefixLength
val n = truncatedWordSet.size.toLong()
if (mnemonic.isEmpty()) throw IllegalArgumentException()
if (words.isEmpty()) throw IllegalArgumentException()
if (mnemonic.isEmpty()) throw DecodingError.InputTooShort
if (words.isEmpty()) throw DecodingError.InputTooShort
fun String.prefix() = substring(0 until prefixLength)

Loading…
Cancel
Save