diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-04-22 13:33:09 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-04-22 13:33:09 +0300 |
commit | 53a97bdcd381342bc7d738946a628654a2261a52 (patch) | |
tree | 9f139ae6efa26fa5a03a1eb35df86c8ba02aec39 /src/wallet/api | |
parent | Wallet API : transaction history in progress (diff) | |
download | monero-53a97bdcd381342bc7d738946a628654a2261a52.tar.xz |
Wallet API: transaction history in progress
Diffstat (limited to 'src/wallet/api')
-rw-r--r-- | src/wallet/api/transaction_history.cpp | 1 | ||||
-rw-r--r-- | src/wallet/api/transaction_info.cpp | 19 | ||||
-rw-r--r-- | src/wallet/api/transaction_info.h | 1 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp index 185cd164f..c7e7472e9 100644 --- a/src/wallet/api/transaction_history.cpp +++ b/src/wallet/api/transaction_history.cpp @@ -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); diff --git a/src/wallet/api/transaction_info.cpp b/src/wallet/api/transaction_info.cpp index c28c52355..578b84832 100644 --- a/src/wallet/api/transaction_info.cpp +++ b/src/wallet/api/transaction_info.cpp @@ -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 diff --git a/src/wallet/api/transaction_info.h b/src/wallet/api/transaction_info.h index 945b0d9ed..a06bc367e 100644 --- a/src/wallet/api/transaction_info.h +++ b/src/wallet/api/transaction_info.h @@ -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; |