You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wallet: Avoid translating RPC errors when creating txs
Also, mark feebumper bilingual_str as Untranslated
They are technical and have previously not been translated either.
It is questionable whether they can even appear in the GUI.
Copy file name to clipboardExpand all lines: src/wallet/feebumper.cpp
+27-25Lines changed: 27 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -3,52 +3,53 @@
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
5
#include<interfaces/chain.h>
6
-
#include<wallet/coincontrol.h>
7
-
#include<wallet/feebumper.h>
8
-
#include<wallet/fees.h>
9
-
#include<wallet/wallet.h>
10
6
#include<policy/fees.h>
11
7
#include<policy/policy.h>
12
8
#include<util/moneystr.h>
13
9
#include<util/rbf.h>
14
10
#include<util/system.h>
11
+
#include<util/translation.h>
12
+
#include<wallet/coincontrol.h>
13
+
#include<wallet/feebumper.h>
14
+
#include<wallet/fees.h>
15
+
#include<wallet/wallet.h>
15
16
16
17
//! Check whether transaction has descendant in wallet or mempool, or has been
17
18
//! mined, or conflicts with a mined transaction. Return a feebumper::Result.
errors.push_back("Transaction has descendants in the wallet");
22
+
errors.push_back(Untranslated("Transaction has descendants in the wallet"));
22
23
return feebumper::Result::INVALID_PARAMETER;
23
24
}
24
25
25
26
{
26
27
if (wallet.chain().hasDescendantsInMempool(wtx.GetHash())) {
27
-
errors.push_back("Transaction has descendants in the mempool");
28
+
errors.push_back(Untranslated("Transaction has descendants in the mempool"));
28
29
return feebumper::Result::INVALID_PARAMETER;
29
30
}
30
31
}
31
32
32
33
if (wtx.GetDepthInMainChain() != 0) {
33
-
errors.push_back("Transaction has been mined, or is conflicted with a mined transaction");
34
+
errors.push_back(Untranslated("Transaction has been mined, or is conflicted with a mined transaction"));
34
35
return feebumper::Result::WALLET_ERROR;
35
36
}
36
37
37
38
if (!SignalsOptInRBF(*wtx.tx)) {
38
-
errors.push_back("Transaction is not BIP 125 replaceable");
39
+
errors.push_back(Untranslated("Transaction is not BIP 125 replaceable"));
39
40
return feebumper::Result::WALLET_ERROR;
40
41
}
41
42
42
43
if (wtx.mapValue.count("replaced_by_txid")) {
43
-
errors.push_back(strprintf("Cannot bump transaction %s which was already bumped by transaction %s", wtx.GetHash().ToString(), wtx.mapValue.at("replaced_by_txid")));
44
+
errors.push_back(strprintf(Untranslated("Cannot bump transaction %s which was already bumped by transaction %s"), wtx.GetHash().ToString(), wtx.mapValue.at("replaced_by_txid")));
44
45
return feebumper::Result::WALLET_ERROR;
45
46
}
46
47
47
48
// check that original tx consists entirely of our inputs
48
49
// if not, we can't bump the fee, because the wallet has no way of knowing the value of the other inputs (thus the fee)
0 commit comments