aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2020-05-04 16:28:00 +0200
committerWladimir J. van der Laan <[email protected]>2020-05-04 16:29:22 +0200
commit23c926d859c60379fba97ad106978077a317841f (patch)
tree2ade2263dd31ed31712c323348473e78c26d0e47 /src/wallet/scriptpubkeyman.cpp
parentMerge #18786: init: Remove boost from ThreadImport (diff)
parentwallet: Remove trailing whitespace from potential translation strings (diff)
downloaddiscoin-23c926d859c60379fba97ad106978077a317841f.tar.xz
discoin-23c926d859c60379fba97ad106978077a317841f.zip
Merge #18699: wallet: Avoid translating RPC errors
fa2cce4391b0b1bda325f695bb45f7b565c8e8ea wallet: Remove trailing whitespace from potential translation strings (MarcoFalke) fa59cc1c977cce8f1f28374ac2169970ca78a35f wallet: Report full error message in wallettool (MarcoFalke) fae7776690c37104d2d4949429c5f84e6a33c576 wallet: Avoid translating RPC errors when creating txs (MarcoFalke) fae51a5c6f4270a1088e6295b10a8cc45988ae46 wallet: Avoid translating RPC errors when loading wallets (MarcoFalke) Pull request description: 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. Fixes #17072 ACKs for top commit: laanwj: ACK fa2cce4391b0b1bda325f695bb45f7b565c8e8ea, checked that no new translation messages are added compared to master. hebasto: ACK fa2cce4391b0b1bda325f695bb45f7b565c8e8ea Tree-SHA512: c6a943ae9c3689ea3c48c20d26de6e4970de0257a1f1eec57a2bded67a4af9dcc5c45b2d64659d6fb4c4bc4d8103e28483ea3d14bb850df8db0ff9e8e5c77ee2
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r--src/wallet/scriptpubkeyman.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index ecb95d599..e4be5045e 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -377,10 +377,9 @@ bool LegacyScriptPubKeyMan::CanGetAddresses(bool internal) const
return keypool_has_keys;
}
-bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error)
+bool LegacyScriptPubKeyMan::Upgrade(int prev_version, bilingual_str& error)
{
LOCK(cs_KeyStore);
- error = "";
bool hd_upgrade = false;
bool split_upgrade = false;
if (m_storage.CanSupportFeature(FEATURE_HD) && !IsHDEnabled()) {
@@ -405,7 +404,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error)
// Regenerate the keypool if upgraded to HD
if (hd_upgrade) {
if (!TopUp()) {
- error = _("Unable to generate keys").translated;
+ error = _("Unable to generate keys");
return false;
}
}