mirror of
https://github.com/monero-project/monero.git
synced 2024-12-28 01:19:24 -05:00
simplewallet: add the change amount to the prompt when locking
This commit is contained in:
parent
7973fb6a69
commit
58eade689c
@ -5914,12 +5914,14 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
|||||||
uint64_t total_fee = 0;
|
uint64_t total_fee = 0;
|
||||||
uint64_t dust_not_in_fee = 0;
|
uint64_t dust_not_in_fee = 0;
|
||||||
uint64_t dust_in_fee = 0;
|
uint64_t dust_in_fee = 0;
|
||||||
|
uint64_t change = 0;
|
||||||
for (size_t n = 0; n < ptx_vector.size(); ++n)
|
for (size_t n = 0; n < ptx_vector.size(); ++n)
|
||||||
{
|
{
|
||||||
total_fee += ptx_vector[n].fee;
|
total_fee += ptx_vector[n].fee;
|
||||||
for (auto i: ptx_vector[n].selected_transfers)
|
for (auto i: ptx_vector[n].selected_transfers)
|
||||||
total_sent += m_wallet->get_transfer_details(i).amount();
|
total_sent += m_wallet->get_transfer_details(i).amount();
|
||||||
total_sent -= ptx_vector[n].change_dts.amount + ptx_vector[n].fee;
|
total_sent -= ptx_vector[n].change_dts.amount + ptx_vector[n].fee;
|
||||||
|
change += ptx_vector[n].change_dts.amount;
|
||||||
|
|
||||||
if (ptx_vector[n].dust_added_to_fee)
|
if (ptx_vector[n].dust_added_to_fee)
|
||||||
dust_in_fee += ptx_vector[n].dust;
|
dust_in_fee += ptx_vector[n].dust;
|
||||||
@ -5957,7 +5959,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
|||||||
if (transfer_type == TransferLocked)
|
if (transfer_type == TransferLocked)
|
||||||
{
|
{
|
||||||
float days = locked_blocks / 720.0f;
|
float days = locked_blocks / 720.0f;
|
||||||
prompt << boost::format(tr(".\nThis transaction will unlock on block %llu, in approximately %s days (assuming 2 minutes per block)")) % ((unsigned long long)unlock_block) % days;
|
prompt << boost::format(tr(".\nThis transaction (including %s change) will unlock on block %llu, in approximately %s days (assuming 2 minutes per block)")) % cryptonote::print_money(change) % ((unsigned long long)unlock_block) % days;
|
||||||
}
|
}
|
||||||
if (m_wallet->print_ring_members())
|
if (m_wallet->print_ring_members())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user