diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f1cf1a96..ef545f26 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4662,7 +4662,7 @@ void wallet2::transfer(const std::vector& dsts, bool shuffle, uint8_t flags, bool send_to_network, - std::string* p_signed_tx_blob_str) + std::string* p_unsigned_filename_or_tx_blob_str) { //TIME_MEASURE_START(precalculation_time); construct_tx_param ctp = AUTO_VAL_INIT(ctp); @@ -4681,7 +4681,7 @@ void wallet2::transfer(const std::vector& dsts, ctp.tx_outs_attr = tx_outs_attr; ctp.unlock_time = unlock_time; //TIME_MEASURE_FINISH(precalculation_time); - transfer(ctp, tx, send_to_network, p_signed_tx_blob_str); + transfer(ctp, tx, send_to_network, p_unsigned_filename_or_tx_blob_str); } //---------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------- @@ -4762,7 +4762,7 @@ void wallet2::check_and_throw_if_self_directed_tx_with_payment_id_requested(cons void wallet2::transfer(const construct_tx_param& ctp, currency::transaction &tx, bool send_to_network, - std::string* p_signed_tx_blob_str) + std::string* p_unsigned_filename_or_tx_blob_str) { WLT_THROW_IF_FALSE_WALLET_CMN_ERR_EX(!is_auditable() || !is_watch_only(), "You can't initiate coins transfer using an auditable watch-only wallet."); // btw, watch-only wallets can call transfer() within cold-signing process diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 8fcbcf4b..c3ab9d66 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -543,7 +543,7 @@ namespace tools bool shuffle = true, uint8_t flags = 0, bool send_to_network = true, - std::string* p_signed_tx_blob_str = nullptr); + std::string* p_unsigned_filename_or_tx_blob_str = nullptr); void transfer(const std::vector& dsts, size_t fake_outputs_count, @@ -563,7 +563,7 @@ namespace tools void transfer(const construct_tx_param& ctp, currency::transaction &tx, bool send_to_network, - std::string* p_signed_tx_blob_str); + std::string* p_unsigned_filename_or_tx_blob_str); template void transfer_from_contract( diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index b1703598..9c9d9db3 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -306,12 +306,12 @@ namespace tools currency::transaction tx; - std::string signed_tx_blob_str; - m_wallet.transfer(dsts, req.mixin, 0/*req.unlock_time*/, req.fee, extra, attachments, detail::ssi_digit, tx_dust_policy(DEFAULT_DUST_THRESHOLD), tx, CURRENCY_TO_KEY_OUT_RELAXED, true, 0, true, &signed_tx_blob_str); + std::string unsigned_tx_blob_str; + m_wallet.transfer(dsts, req.mixin, 0/*req.unlock_time*/, req.fee, extra, attachments, detail::ssi_digit, tx_dust_policy(DEFAULT_DUST_THRESHOLD), tx, CURRENCY_TO_KEY_OUT_RELAXED, true, 0, true, &unsigned_tx_blob_str); if (m_wallet.is_watch_only()) { - res.tx_unsigned_hex = epee::string_tools::buff_to_hex_nodelimer(signed_tx_blob_str); // watch-only wallets can't sign and relay transactions - // leave res.tx_hash empty, because tx has will change after signing + res.tx_unsigned_hex = epee::string_tools::buff_to_hex_nodelimer(unsigned_tx_blob_str); // watch-only wallets could not sign and relay transactions + // leave res.tx_hash empty, because tx hash will change after signing } else {