diff --git a/src/wallet/MoneroWalletModel.cpp b/src/wallet/MoneroWalletModel.cpp index eac187b..ff792ed 100644 --- a/src/wallet/MoneroWalletModel.cpp +++ b/src/wallet/MoneroWalletModel.cpp @@ -532,9 +532,15 @@ namespace monero { if (this != src.get()) throw runtime_error("this != src"); // copy base class - MoneroOutputWallet::copy(static_pointer_cast(src), static_pointer_cast(tgt)); + MoneroOutput::copy(static_pointer_cast(src), static_pointer_cast(tgt)); - throw runtime_error("MoneroOutputWallet::copy(outputWallet) not implemented"); + // copy extensions + tgt->accountIndex = src->accountIndex; + tgt->subaddressIndex = src->subaddressIndex; + tgt->isSpent = src->isSpent; + tgt->isUnlocked = src->isUnlocked; + tgt->isFrozen = src->isFrozen; + return tgt; }; boost::property_tree::ptree MoneroOutputWallet::toPropertyTree() const { @@ -566,9 +572,15 @@ namespace monero { }; shared_ptr MoneroOutputRequest::copy(const shared_ptr& src, const shared_ptr& tgt) const { - throw runtime_error("MoneroOutputRequest::copy(outputRequest) not implemented"); + MTRACE("MoneroOutputRequest::copy(outputRequest)"); if (this != src.get()) throw runtime_error("this != src"); - throw runtime_error("MoneroOutputRequest::copy() not implemented"); + + // copy base class + MoneroOutputWallet::copy(static_pointer_cast(src), static_pointer_cast(tgt)); + + // copy extensions + if (!src->subaddressIndices.empty()) tgt->subaddressIndices = vector(src->subaddressIndices); + return tgt; }; boost::property_tree::ptree MoneroOutputRequest::toPropertyTree() const {