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.
This commit is contained in:
MarcoFalke
2020-04-18 15:18:17 -04:00
parent fae51a5c6f
commit fae7776690
9 changed files with 95 additions and 90 deletions

View File

@@ -219,7 +219,7 @@ public:
bool sign,
int& change_pos,
CAmount& fee,
std::string& fail_reason) override
bilingual_str& fail_reason) override
{
LOCK(m_wallet->cs_wallet);
CTransactionRef tx;
@@ -248,7 +248,7 @@ public:
}
bool createBumpTransaction(const uint256& txid,
const CCoinControl& coin_control,
std::vector<std::string>& errors,
std::vector<bilingual_str>& errors,
CAmount& old_fee,
CAmount& new_fee,
CMutableTransaction& mtx) override
@@ -258,7 +258,7 @@ public:
bool signBumpTransaction(CMutableTransaction& mtx) override { return feebumper::SignTransaction(*m_wallet.get(), mtx); }
bool commitBumpTransaction(const uint256& txid,
CMutableTransaction&& mtx,
std::vector<std::string>& errors,
std::vector<bilingual_str>& errors,
uint256& bumped_txid) override
{
return feebumper::CommitTransaction(*m_wallet.get(), txid, std::move(mtx), errors, bumped_txid) ==

View File

@@ -31,6 +31,7 @@ enum class TransactionError;
enum isminetype : unsigned int;
struct CRecipient;
struct PartiallySignedTransaction;
struct bilingual_str;
typedef uint8_t isminefilter;
namespace interfaces {
@@ -136,7 +137,7 @@ public:
bool sign,
int& change_pos,
CAmount& fee,
std::string& fail_reason) = 0;
bilingual_str& fail_reason) = 0;
//! Commit transaction.
virtual void commitTransaction(CTransactionRef tx,
@@ -155,7 +156,7 @@ public:
//! Create bump transaction.
virtual bool createBumpTransaction(const uint256& txid,
const CCoinControl& coin_control,
std::vector<std::string>& errors,
std::vector<bilingual_str>& errors,
CAmount& old_fee,
CAmount& new_fee,
CMutableTransaction& mtx) = 0;
@@ -166,7 +167,7 @@ public:
//! Commit bump transaction.
virtual bool commitBumpTransaction(const uint256& txid,
CMutableTransaction&& mtx,
std::vector<std::string>& errors,
std::vector<bilingual_str>& errors,
uint256& bumped_txid) = 0;
//! Get a transaction.