From fae51a5c6f4270a1088e6295b10a8cc45988ae46 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 19 Aug 2019 18:12:35 -0400 Subject: 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. --- src/wallet/test/wallet_tests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/wallet/test') 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 #include #include +#include #include #include #include @@ -30,8 +31,8 @@ BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup) static std::shared_ptr TestLoadWallet(interfaces::Chain& chain) { - std::string error; - std::vector warnings; + bilingual_str error; + std::vector warnings; auto wallet = CWallet::CreateWalletFromFile(chain, WalletLocation(""), error, warnings); wallet->postInitProcess(); return wallet; -- cgit v1.2.3