Fix cli wallet memo displaying

This commit is contained in:
serkixenos 2021-12-27 00:28:29 -04:00
parent bfc778068c
commit 5e85079281

View file

@ -4184,6 +4184,8 @@ string operation_printer::operator()(const transfer_operation& op) const
std::string memo;
if( op.memo )
{
bool is_encrypted = ((op.memo->from != public_key_type()) && (op.memo->to != public_key_type()));
if (is_encrypted) {
if( wallet.is_locked() )
{
out << " -- Unlock wallet to see memo.";
@ -4206,6 +4208,10 @@ string operation_printer::operator()(const transfer_operation& op) const
elog("Error when decrypting memo: ${e}", ("e", e.to_detail_string()));
}
}
} else {
memo = op.memo->get_message(private_key_type(), public_key_type());
out << " -- Memo: " << memo;
}
}
fee(op.fee);
return memo;