diff options
Diffstat (limited to 'src')
-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 | ||||
-rw-r--r-- | src/wallet/wallet2_api.h | 1 |
4 files changed, 15 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; diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index c4843d33f..4954db0d2 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -71,6 +71,7 @@ struct TransactionInfo virtual bool isFailed() const = 0; virtual uint64_t amount() const = 0; virtual uint64_t fee() const = 0; + virtual uint64_t blockHeight() const = 0; virtual std::string hash() const = 0; virtual std::time_t timestamp() const = 0; virtual std::string paymentId() const = 0; |