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/test/wallet_tests.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/test/wallet_tests.cpp')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index c049f2f15f..66e2ae9b62 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -15,6 +15,7 @@ #include <rpc/server.h> #include <test/util/logging.h> #include <test/util/setup_common.h> +#include <util/translation.h> #include <validation.h> #include <wallet/coincontrol.h> #include <wallet/test/wallet_test_fixture.h> @@ -30,8 +31,8 @@ BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup) static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain& chain) { - std::string error; - std::vector<std::string> warnings; + bilingual_str error; + std::vector<bilingual_str> warnings; auto wallet = CWallet::CreateWalletFromFile(chain, WalletLocation(""), error, warnings); wallet->postInitProcess(); return wallet; |