mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 10:05:15 +00:00
Fix empty recovery password error
This commit is contained in:
parent
eb63af2f8d
commit
8cc7e65abf
@ -83,8 +83,8 @@ class MnemonicCodec(private val loadFileContents: (String) -> String) {
|
|||||||
val prefixLength = languageConfiguration.prefixLength
|
val prefixLength = languageConfiguration.prefixLength
|
||||||
val n = truncatedWordSet.size.toLong()
|
val n = truncatedWordSet.size.toLong()
|
||||||
|
|
||||||
if (mnemonic.isEmpty()) throw IllegalArgumentException()
|
if (mnemonic.isEmpty()) throw DecodingError.InputTooShort
|
||||||
if (words.isEmpty()) throw IllegalArgumentException()
|
if (words.isEmpty()) throw DecodingError.InputTooShort
|
||||||
|
|
||||||
fun String.prefix() = substring(0 until prefixLength)
|
fun String.prefix() = substring(0 until prefixLength)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user