mirror of
https://github.com/wownero/lwsf-wow.git
synced 2026-10-17 07:21:28 +02:00
A few small changes to the ledger output
This commit is contained in:
+8
-6
@@ -199,7 +199,7 @@ namespace
|
|||||||
{
|
{
|
||||||
if (!wallet->store({}))
|
if (!wallet->store({}))
|
||||||
throw std::runtime_error{"Failed to store wallet file: " + wallet->errorString()};
|
throw std::runtime_error{"Failed to store wallet file: " + wallet->errorString()};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "; Primary Address: " << wallet->address() << std::endl;
|
std::cout << "; Primary Address: " << wallet->address() << std::endl;
|
||||||
std::cout << "; Blockchain Height: " << wallet->daemonBlockChainHeight() << std::endl;
|
std::cout << "; Blockchain Height: " << wallet->daemonBlockChainHeight() << std::endl;
|
||||||
@@ -230,18 +230,20 @@ namespace
|
|||||||
if (sizeof(buf) - 1 != std::strftime(buf, sizeof(buf), "%Y/%m/%d", std::addressof(expanded)))
|
if (sizeof(buf) - 1 != std::strftime(buf, sizeof(buf), "%Y/%m/%d", std::addressof(expanded)))
|
||||||
throw std::runtime_error{"strftime failed"};
|
throw std::runtime_error{"strftime failed"};
|
||||||
|
|
||||||
std::cout << buf << " (" << info->hash() << ") " << info->label() << std::endl;
|
std::cout << buf << " (" << info->hash() << ") " << info->description() << std::endl;
|
||||||
|
|
||||||
|
const std::string& label = info->label();
|
||||||
|
const std::string& account = label.empty() ? std::to_string(info->subaddrAccount()) : label;
|
||||||
if (info->direction() == Monero::TransactionInfo::Direction_In)
|
if (info->direction() == Monero::TransactionInfo::Direction_In)
|
||||||
{
|
{
|
||||||
std::cout << " Assets:Monero:" << info->subaddrAccount() << " " << cryptonote::print_money(info->amount()) << std::endl;
|
std::cout << " Assets:Monero:" << account << " " << cryptonote::print_money(info->amount()) << " XMR" << std::endl;
|
||||||
std::cout << " Income" << std::endl;
|
std::cout << " Income" << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << " Expenses " << cryptonote::print_money(info->amount()) << std::endl;
|
std::cout << " Expenses " << cryptonote::print_money(info->amount()) << " XMR " << std::endl;
|
||||||
std::cout << " Expenses:Monero:Fee " << cryptonote::print_money(info->fee()) << std::endl;
|
std::cout << " Expenses:Monero:Fee " << cryptonote::print_money(info->fee()) << " XMR" << std::endl;
|
||||||
std::cout << " Assets:Monero:" << info->subaddrAccount() << std::endl;
|
std::cout << " Assets:Monero:" << account << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user