mirror of
https://github.com/monero-project/monero.git
synced 2025-11-29 20:26:32 -05:00
wallet2_api: add API for tx notes
This commit is contained in:
parent
d51f1af75f
commit
97288a5ce2
5 changed files with 46 additions and 0 deletions
|
|
@ -707,6 +707,26 @@ void WalletImpl::setDefaultMixin(uint32_t arg)
|
|||
m_wallet->default_mixin(arg);
|
||||
}
|
||||
|
||||
bool WalletImpl::setUserNote(const std::string &txid, const std::string ¬e)
|
||||
{
|
||||
cryptonote::blobdata txid_data;
|
||||
if(!epee::string_tools::parse_hexstr_to_binbuff(txid, txid_data))
|
||||
return false;
|
||||
const crypto::hash htxid = *reinterpret_cast<const crypto::hash*>(txid_data.data());
|
||||
|
||||
m_wallet->set_tx_note(htxid, note);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string WalletImpl::getUserNote(const std::string &txid) const
|
||||
{
|
||||
cryptonote::blobdata txid_data;
|
||||
if(!epee::string_tools::parse_hexstr_to_binbuff(txid, txid_data))
|
||||
return "";
|
||||
const crypto::hash htxid = *reinterpret_cast<const crypto::hash*>(txid_data.data());
|
||||
|
||||
return m_wallet->get_tx_note(htxid);
|
||||
}
|
||||
|
||||
bool WalletImpl::connectToDaemon()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue