mirror of
https://github.com/monero-project/monero.git
synced 2025-12-15 03:15:19 -05:00
Wallet API: transaction history in progress
This commit is contained in:
parent
02c9df5de2
commit
53a97bdcd3
5 changed files with 19 additions and 11 deletions
|
|
@ -103,6 +103,7 @@ void TransactionHistoryImpl::refresh()
|
|||
ti->m_amount = pd.m_amount;
|
||||
ti->m_direction = TransactionInfo::Direction_In;
|
||||
ti->m_hash = string_tools::pod_to_hex(pd.m_tx_hash);
|
||||
ti->m_blockheight = pd.m_block_height;
|
||||
// TODO:
|
||||
// ti->m_timestamp = pd.m_timestamp;
|
||||
m_history.push_back(ti);
|
||||
|
|
|
|||
|
|
@ -62,37 +62,42 @@ int TransactionInfoImpl::direction() const
|
|||
|
||||
bool TransactionInfoImpl::isHold() const
|
||||
{
|
||||
return false;
|
||||
return m_hold;
|
||||
}
|
||||
|
||||
bool TransactionInfoImpl::isFailed() const
|
||||
{
|
||||
return false;
|
||||
return m_failed;
|
||||
}
|
||||
|
||||
uint64_t TransactionInfoImpl::amount() const
|
||||
{
|
||||
return 0;
|
||||
return m_amount;
|
||||
}
|
||||
|
||||
uint64_t TransactionInfoImpl::fee() const
|
||||
{
|
||||
return 0;
|
||||
return m_fee;
|
||||
}
|
||||
|
||||
uint64_t TransactionInfoImpl::blockHeight() const
|
||||
{
|
||||
return m_blockheight;
|
||||
}
|
||||
|
||||
string TransactionInfoImpl::hash() const
|
||||
{
|
||||
return "";
|
||||
return m_hash;
|
||||
}
|
||||
|
||||
std::time_t TransactionInfoImpl::timestamp() const
|
||||
{
|
||||
return std::time_t(0);
|
||||
return m_timestamp;
|
||||
}
|
||||
|
||||
string TransactionInfoImpl::paymentId() const
|
||||
{
|
||||
return "";
|
||||
return m_paymentid;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ public:
|
|||
virtual uint64_t amount() const;
|
||||
//! always 0 for incoming txes
|
||||
virtual uint64_t fee() const;
|
||||
virtual uint64_t blockHeight() const;
|
||||
|
||||
virtual std::string hash() const;
|
||||
virtual std::time_t timestamp() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue