Fix the exception message for SetSeedFromMnemonic failure
It's possible for SetSeedFromMnemonic (a wrapper around zip339_phrase_to_seed) to fail for multiple reasons, including an invalid language code or seed string -- a message about non-UTF8ness is not correct.
This commit is contained in:
parent
3cf2ba8853
commit
d7b13560c5
|
@ -79,7 +79,7 @@ public:
|
||||||
READWRITE(mnemonic);
|
READWRITE(mnemonic);
|
||||||
language = (Language) language0;
|
language = (Language) language0;
|
||||||
if (!SetSeedFromMnemonic()) {
|
if (!SetSeedFromMnemonic()) {
|
||||||
throw std::ios_base::failure("Could not interpret the mnemonic phrase as a valid UTF-8 string.");
|
throw std::ios_base::failure("Invalid mnemonic phrase or language code.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uint32_t language0 = (uint32_t) language;
|
uint32_t language0 = (uint32_t) language;
|
||||||
|
|
Loading…
Reference in New Issue