show '<Not set>' for empty wallet description

This commit is contained in:
cryptochangements34 2018-03-15 23:22:45 -04:00
parent e9f41e405f
commit 833f9fcfe9
1 changed files with 6 additions and 2 deletions

View File

@ -6449,9 +6449,13 @@ bool simple_wallet::wallet_info(const std::vector<std::string> &args)
{ {
bool ready; bool ready;
uint32_t threshold, total; uint32_t threshold, total;
std::string description = m_wallet->get_description();
if (description.empty())
{
description = "<Not set>";
}
message_writer() << tr("Filename: ") << m_wallet->get_wallet_file(); message_writer() << tr("Filename: ") << m_wallet->get_wallet_file();
message_writer() << tr("Description: ") << m_wallet->get_description(); message_writer() << tr("Description: ") << description;
message_writer() << tr("Address: ") << m_wallet->get_account().get_public_address_str(m_wallet->nettype()); message_writer() << tr("Address: ") << m_wallet->get_account().get_public_address_str(m_wallet->nettype());
std::string type; std::string type;
if (m_wallet->watch_only()) if (m_wallet->watch_only())