aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/node.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-08-19 18:12:35 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-01 07:39:00 -0400
commitfae51a5c6f4270a1088e6295b10a8cc45988ae46 (patch)
tree1367e0780ab7e2fda2cb1cd46174029515d098f2 /src/interfaces/node.h
parent608359b071dac82a9cf33a6c9e01f87abfcb90eb (diff)
downloadbitcoin-fae51a5c6f4270a1088e6295b10a8cc45988ae46.tar.xz
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/interfaces/node.h')
-rw-r--r--src/interfaces/node.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 53a20886cd..db9b42b293 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -27,9 +27,10 @@ class Coin;
class RPCTimerInterface;
class UniValue;
class proxyType;
+enum class WalletCreationStatus;
struct CNodeStateStats;
struct NodeContext;
-enum class WalletCreationStatus;
+struct bilingual_str;
namespace interfaces {
class Handler;
@@ -201,10 +202,10 @@ public:
//! Attempts to load a wallet from file or directory.
//! The loaded wallet is also notified to handlers previously registered
//! with handleLoadWallet.
- virtual std::unique_ptr<Wallet> loadWallet(const std::string& name, std::string& error, std::vector<std::string>& warnings) = 0;
+ virtual std::unique_ptr<Wallet> loadWallet(const std::string& name, bilingual_str& error, std::vector<bilingual_str>& warnings) = 0;
//! Create a wallet from file
- virtual std::unique_ptr<Wallet> createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector<std::string>& warnings, WalletCreationStatus& status) = 0;
+ virtual std::unique_ptr<Wallet> createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, bilingual_str& error, std::vector<bilingual_str>& warnings, WalletCreationStatus& status) = 0;
//! Register handler for init messages.
using InitMessageFn = std::function<void(const std::string& message)>;