diff --git a/src/wallet/MoneroWalletModel.cpp b/src/wallet/MoneroWalletModel.cpp index 9b2d31b..635e920 100644 --- a/src/wallet/MoneroWalletModel.cpp +++ b/src/wallet/MoneroWalletModel.cpp @@ -194,15 +194,23 @@ namespace monero { shared_ptr MoneroTxRequest::copy(const shared_ptr& src, const shared_ptr& tgt) const { MTRACE("MoneroTxRequest::copy(const shared_ptr& src, const shared_ptr& tgt)"); - MTRACE("src: " << src); - MTRACE("tgt: " << tgt); if (this != src.get()) throw runtime_error("this != src"); // copy base class - MTRACE("copying base"); MoneroTxWallet::copy(static_pointer_cast(src), static_pointer_cast(tgt)); - throw runtime_error("MoneroTxRequest::copy(txRequest) not implemented"); + // copy request extensions + tgt->isOutgoing = src->isOutgoing; + tgt->isIncoming = src->isIncoming; + if (!src->txIds.empty()) tgt->txIds = vector(src->txIds); + tgt-> hasPaymentId = src->hasPaymentId; + if (!src->paymentIds.empty()) tgt->paymentIds = vector(src->paymentIds); + tgt->height = src->height; + tgt->minHeight = src->minHeight; + tgt->maxHeight = src->maxHeight; + tgt->includeOutputs = src->includeOutputs; + if (src->transferRequest != boost::none) tgt->transferRequest = src->transferRequest.get()->copy(src->transferRequest.get(), make_shared()); + if (src->outputRequest != boost::none) tgt->outputRequest = src->outputRequest.get()->copy(src->outputRequest.get(), make_shared()); }; boost::property_tree::ptree MoneroTxRequest::toPropertyTree() const {