std::vector<TaggedOutput> CreateTxDialog::getOutputs() { std::vector<TaggedOutput> outputs; std::set<TxOutLayout*> txOutLayoutsCopy = txOutLayouts; for (auto& txOutLayout: txOutLayoutsCopy) { if (txOutLayout->getAddress().isEmpty()) { removeTxOut(txOutLayout); continue; } TaggedOutput output(txOutLayout->getScript(), txOutLayout->getValue(), txOutLayout->getRecipient().toStdString()); outputs.push_back(output); } if (outputs.empty()) { addTxOut(); throw std::runtime_error("No outputs entered."); } return outputs; }
std::vector<std::shared_ptr<CoinDB::TxOut>> CreateTxDialog::getTxOuts() { std::vector<std::shared_ptr<CoinDB::TxOut>> txouts; std::set<TxOutLayout*> txOutLayoutsCopy = txOutLayouts; for (auto& txOutLayout: txOutLayoutsCopy) { if (txOutLayout->getAddress().isEmpty()) { removeTxOut(txOutLayout); continue; } std::shared_ptr<CoinDB::TxOut> txout(new CoinDB::TxOut(txOutLayout->getValue(), txOutLayout->getScript())); txout->sending_label(txOutLayout->getRecipient().toStdString()); txouts.push_back(txout); } if (txouts.empty()) { addTxOut(); throw std::runtime_error("No outputs entered."); } return txouts; }