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/dummywallet.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/dummywallet.cpp')
-rw-r--r-- | src/dummywallet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<std::shared_ptr<CWallet>> GetWallets() throw std::logic_error("Wallet function called in non-wallet build."); } -std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::vector<std::string>& warnings) +std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string& name, bilingual_str& error, std::vector<bilingual_str>& 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<std::string>& warnings, std::shared_ptr<CWallet>& result) +WalletCreationStatus CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, bilingual_str& error, std::vector<bilingual_str>& warnings, std::shared_ptr<CWallet>& result) { throw std::logic_error("Wallet function called in non-wallet build."); } |