aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-05-24 12:29:51 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-07-08 11:18:35 -0300
commit198fcca162f4d2f877feab485e629ff89818ff56 (patch)
treec2d761c60589b323f811883963853326e421718d /src/wallet/rpc
parent7a45c33d1f8a758850cf8e7bd6ad508939ba5c0d (diff)
downloadbitcoin-198fcca162f4d2f877feab485e629ff89818ff56.tar.xz
wallet: refactor, include 'FeeCalculation' inside 'CreatedTransactionResult'
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r--src/wallet/rpc/spend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp
index 0e8cee5db8..362e9113fb 100644
--- a/src/wallet/rpc/spend.cpp
+++ b/src/wallet/rpc/spend.cpp
@@ -157,8 +157,7 @@ UniValue SendMoney(CWallet& wallet, const CCoinControl &coin_control, std::vecto
// Send
constexpr int RANDOM_CHANGE_POSITION = -1;
bilingual_str error;
- FeeCalculation fee_calc_out;
- std::optional<CreatedTransactionResult> txr = CreateTransaction(wallet, recipients, RANDOM_CHANGE_POSITION, error, coin_control, fee_calc_out, true);
+ std::optional<CreatedTransactionResult> txr = CreateTransaction(wallet, recipients, RANDOM_CHANGE_POSITION, error, coin_control, true);
if (!txr) {
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, error.original);
}
@@ -167,7 +166,7 @@ UniValue SendMoney(CWallet& wallet, const CCoinControl &coin_control, std::vecto
if (verbose) {
UniValue entry(UniValue::VOBJ);
entry.pushKV("txid", tx->GetHash().GetHex());
- entry.pushKV("fee_reason", StringForFeeReason(fee_calc_out.reason));
+ entry.pushKV("fee_reason", StringForFeeReason(txr->fee_calc.reason));
return entry;
}
return tx->GetHash().GetHex();