From d7b13560c50fcd55bb39ea9257b491f63fa2d9f9 Mon Sep 17 00:00:00 2001 From: sasha Date: Fri, 1 Apr 2022 15:46:10 -0700 Subject: [PATCH] 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. --- src/zcash/address/mnemonic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zcash/address/mnemonic.h b/src/zcash/address/mnemonic.h index e93fd6fe4..3b5ed7ed3 100644 --- a/src/zcash/address/mnemonic.h +++ b/src/zcash/address/mnemonic.h @@ -79,7 +79,7 @@ public: READWRITE(mnemonic); language = (Language) language0; 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 { uint32_t language0 = (uint32_t) language;