diff --git a/src/wallet/monero_wallet_model.cpp b/src/wallet/monero_wallet_model.cpp index 8487a4a..f11a38d 100644 --- a/src/wallet/monero_wallet_model.cpp +++ b/src/wallet/monero_wallet_model.cpp @@ -358,9 +358,6 @@ namespace monero { } shared_ptr monero_incoming_transfer::copy(const shared_ptr& src, const shared_ptr& tgt) const { - - - throw runtime_error("monero_incoming_transfer::copy(inTransfer) not implemented"); }; @@ -569,7 +566,17 @@ namespace monero { } void monero_output_wallet::merge(const shared_ptr& self, const shared_ptr& other) { - throw runtime_error("monero_output_wallet::merge(self, other) not implemented"); + MTRACE("monero_output_wallet::merge(self, other)"); + if (this != self.get()) throw runtime_error("this != self"); + if (self == other) return; + + // merge base classes + monero_output::merge(self, other); + + // merge output wallet extensions + m_account_index = monero_utils::reconcile(m_account_index, other->m_account_index); + m_subaddress_index = monero_utils::reconcile(m_subaddress_index, other->m_subaddress_index); + m_is_spent = monero_utils::reconcile(m_is_spent, other->m_is_spent); } // ------------------------ MONERO OUTPUT REQUEST ---------------------------