101 boost::unique_lock<boost::shared_mutex> lock(m_historyMutex);
109 for (
auto t : m_history)
121 std::list<std::pair<crypto::hash, tools::wallet2::payment_details>> in_payments;
122 m_wallet->m_wallet->get_payments(in_payments, min_height, max_height);
123 for (std::list<std::pair<crypto::hash, tools::wallet2::payment_details>>::const_iterator i = in_payments.begin(); i != in_payments.end(); ++i) {
126 if (payment_id.substr(16).find_first_not_of(
'0') == std::string::npos)
127 payment_id = payment_id.substr(0,16);
128 TransactionInfoImpl * ti =
new TransactionInfoImpl();
129 ti->m_paymentid = payment_id;
136 ti->m_label = m_wallet->m_wallet->get_subaddress_label(pd.
m_subaddr_index);
140 m_history.push_back(ti);
152 std::list<std::pair<crypto::hash, tools::wallet2::confirmed_transfer_details>> out_payments;
153 m_wallet->m_wallet->get_payments_out(out_payments, min_height, max_height);
155 for (std::list<std::pair<crypto::hash, tools::wallet2::confirmed_transfer_details>>::const_iterator i = out_payments.begin();
156 i != out_payments.end(); ++i) {
166 if (payment_id.substr(16).find_first_not_of(
'0') == std::string::npos)
167 payment_id = payment_id.substr(0,16);
170 TransactionInfoImpl * ti =
new TransactionInfoImpl();
171 ti->m_paymentid = payment_id;
187 m_history.push_back(ti);
191 std::list<std::pair<crypto::hash, tools::wallet2::unconfirmed_transfer_details>> upayments_out;
192 m_wallet->m_wallet->get_unconfirmed_payments_out(upayments_out);
193 for (std::list<std::pair<crypto::hash, tools::wallet2::unconfirmed_transfer_details>>::const_iterator i = upayments_out.begin(); i != upayments_out.end(); ++i) {
199 if (payment_id.substr(16).find_first_not_of(
'0') == std::string::npos)
200 payment_id = payment_id.substr(0,16);
203 TransactionInfoImpl * ti =
new TransactionInfoImpl();
204 ti->m_paymentid = payment_id;
205 ti->m_amount = amount - pd.
m_change - fee;
208 ti->m_failed = is_failed;
209 ti->m_pending =
true;
215 ti->m_confirmations = 0;
216 m_history.push_back(ti);
221 std::list<std::pair<crypto::hash, tools::wallet2::pool_payment_details>> upayments;
222 m_wallet->m_wallet->get_unconfirmed_payments(upayments);
223 for (std::list<std::pair<crypto::hash, tools::wallet2::pool_payment_details>>::const_iterator i = upayments.begin(); i != upayments.end(); ++i) {
226 if (payment_id.substr(16).find_first_not_of(
'0') == std::string::npos)
227 payment_id = payment_id.substr(0,16);
228 TransactionInfoImpl * ti =
new TransactionInfoImpl();
229 ti->m_paymentid = payment_id;
234 ti->m_pending =
true;
237 ti->m_label = m_wallet->m_wallet->get_subaddress_label(pd.
m_subaddr_index);
239 ti->m_confirmations = 0;
240 m_history.push_back(ti);
std::string get_account_address_as_str(network_type nettype, bool subaddress, account_public_address const &adr)
for(i=1;i< 1;++i) fe_sq(t0
unsigned __int64 uint64_t
uint64_t blockChainHeight() const override
blockChainHeight - returns current blockchain height