Debian Codegraph @

monero/src/wallet/api/pending_transaction_info.cpp

raw symbols SCIP
1 #include "pending_transaction_info.h"
2 #include "transaction_construction_info.h"
3
4 using namespace std;
5
6 namespace Monero {
7
8 PendingTransactionInfo::~PendingTransactionInfo() = default;
9
10 PendingTransactionInfoImpl::PendingTransactionInfoImpl(WalletImpl &wallet, const tools::wallet2::pending_tx & ptx)
11 : m_wallet(wallet)
12 , m_ptx(ptx)
13 , m_constructionData(new TransactionConstructionInfoImpl(wallet, ptx.construction_data))
14 {
15 }
16
17 PendingTransactionInfoImpl::~PendingTransactionInfoImpl() = default;
18
19 uint64_t PendingTransactionInfoImpl::fee() const
20 {
21 return m_ptx.fee;
22 }
23
24 uint64_t PendingTransactionInfoImpl::dust() const
25 {
26 return m_ptx.dust;
27 }
28
29 bool PendingTransactionInfoImpl::dustAddedToFee() const
30 {
31 return m_ptx.dust_added_to_fee;
32 }
33
34 std::string PendingTransactionInfoImpl::txKey() const
35 {
36 return epee::string_tools::pod_to_hex(unwrap(unwrap(m_ptx.tx_key)));
37 }
38
39 TransactionConstructionInfo * PendingTransactionInfoImpl::constructionData() const {
40 return m_constructionData;
41 }
42
43 // TransactionConstructionInfo::Output TransactionConstructionInfoImpl::change() const {
44 // return Output(
45 // {m_ptx.change_dts.amount, m_ptx.change_dts.address(m_wallet.m_wallet->nettype(), crypto::hash())});
46 // }
47 }
48
49 namespace Bitmonero = Monero;