diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-08-19 18:12:35 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-01 07:39:00 -0400 |
commit | fae51a5c6f4270a1088e6295b10a8cc45988ae46 (patch) | |
tree | 1367e0780ab7e2fda2cb1cd46174029515d098f2 /src/wallet/wallettool.cpp | |
parent | 608359b071dac82a9cf33a6c9e01f87abfcb90eb (diff) |
wallet: Avoid translating RPC errors when loading wallets
Common errors and warnings should be translated when displayed in the
GUI, but not translated when displayed elsewhere. The wallet method
CreateWalletFromFile does not know its caller, so this commit changes it
to return a bilingual_str to the caller.
Diffstat (limited to 'src/wallet/wallettool.cpp')
-rw-r--r-- | src/wallet/wallettool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index 65643669c2..2193edcfa5 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -4,6 +4,7 @@ #include <fs.h> #include <util/system.h> +#include <util/translation.h> #include <wallet/wallet.h> #include <wallet/walletutil.h> @@ -117,7 +118,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name) tfm::format(std::cerr, "Error: no wallet file at %s\n", name); return false; } - std::string error; + bilingual_str error; if (!WalletBatch::VerifyEnvironment(path, error)) { tfm::format(std::cerr, "Error loading %s. Is wallet being used by other process?\n", name); return false; |