set monero_tx_wallet.m_is_unlocked in monero_wallet

This commit is contained in:
woodser
2019-11-21 12:02:03 -05:00
parent 240b454860
commit 6041e12be8
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -102,6 +102,7 @@ namespace monero {
if (tx->m_payment_id->substr(16).find_first_not_of('0') == std::string::npos) tx->m_payment_id = tx->m_payment_id->substr(0, 16); // TODO monero core: this should be part of core wallet
if (tx->m_payment_id == monero_tx::DEFAULT_PAYMENT_ID) tx->m_payment_id = boost::none; // clear default payment id
tx->m_unlock_time = pd.m_unlock_time;
tx->m_is_unlocked = m_w2.is_transfer_unlocked(pd.m_unlock_time, pd.m_block_height);
tx->m_fee = pd.m_fee;
tx->m_note = m_w2.get_tx_note(pd.m_tx_hash);
if (tx->m_note->empty()) tx->m_note = boost::none; // clear empty note
@@ -153,6 +154,7 @@ namespace monero {
if (tx->m_payment_id->substr(16).find_first_not_of('0') == std::string::npos) tx->m_payment_id = tx->m_payment_id->substr(0, 16); // TODO monero core: this should be part of core wallet
if (tx->m_payment_id == monero_tx::DEFAULT_PAYMENT_ID) tx->m_payment_id = boost::none; // clear default payment id
tx->m_unlock_time = pd.m_unlock_time;
tx->m_is_unlocked = m_w2.is_transfer_unlocked(pd.m_unlock_time, pd.m_block_height);
tx->m_fee = pd.m_amount_in - pd.m_amount_out;
tx->m_note = m_w2.get_tx_note(txid);
if (tx->m_note->empty()) tx->m_note = boost::none; // clear empty note
@@ -219,6 +221,7 @@ namespace monero {
if (tx->m_payment_id->substr(16).find_first_not_of('0') == std::string::npos) tx->m_payment_id = tx->m_payment_id->substr(0, 16); // TODO monero core: this should be part of core wallet
if (tx->m_payment_id == monero_tx::DEFAULT_PAYMENT_ID) tx->m_payment_id = boost::none; // clear default payment id
tx->m_unlock_time = pd.m_unlock_time;
tx->m_is_unlocked = false;
tx->m_fee = pd.m_fee;
tx->m_note = m_w2.get_tx_note(pd.m_tx_hash);
if (tx->m_note->empty()) tx->m_note = boost::none; // clear empty note
@@ -259,6 +262,7 @@ namespace monero {
if (tx->m_payment_id->substr(16).find_first_not_of('0') == std::string::npos) tx->m_payment_id = tx->m_payment_id->substr(0, 16); // TODO monero core: this should be part of core wallet
if (tx->m_payment_id == monero_tx::DEFAULT_PAYMENT_ID) tx->m_payment_id = boost::none; // clear default payment id
tx->m_unlock_time = pd.m_tx.unlock_time;
tx->m_is_unlocked = false;
tx->m_fee = pd.m_amount_in - pd.m_amount_out;
tx->m_note = m_w2.get_tx_note(txid);
if (tx->m_note->empty()) tx->m_note = boost::none; // clear empty note
+1
View File
@@ -261,6 +261,7 @@ namespace monero {
vector<shared_ptr<monero_incoming_transfer>> m_incoming_transfers;
boost::optional<shared_ptr<monero_outgoing_transfer>> m_outgoing_transfer;
boost::optional<string> m_note;
boost::optional<bool> m_is_unlocked;
shared_ptr<monero_tx_wallet> copy(const shared_ptr<monero_tx>& src, const shared_ptr<monero_tx>& tgt) const;
shared_ptr<monero_tx_wallet> copy(const shared_ptr<monero_tx_wallet>& src, const shared_ptr<monero_tx_wallet>& tgt) const;