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/dummywallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dummywallet.cpp') diff --git a/src/dummywallet.cpp b/src/dummywallet.cpp index a5582e3b2c..0f7848bae1 100644 --- a/src/dummywallet.cpp +++ b/src/dummywallet.cpp @@ -8,6 +8,7 @@ class CWallet; enum class WalletCreationStatus; +struct bilingual_str; namespace interfaces { class Chain; @@ -72,12 +73,12 @@ std::vector> GetWallets() throw std::logic_error("Wallet function called in non-wallet build."); } -std::shared_ptr LoadWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::vector& warnings) +std::shared_ptr LoadWallet(interfaces::Chain& chain, const std::string& name, bilingual_str& error, std::vector& warnings) { throw std::logic_error("Wallet function called in non-wallet build."); } -WalletCreationStatus CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector& warnings, std::shared_ptr& result) +WalletCreationStatus CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, bilingual_str& error, std::vector& warnings, std::shared_ptr& result) { throw std::logic_error("Wallet function called in non-wallet build."); } -- cgit v1.2.3