select method added to MysqlTransactions

pull/1/head
moneroexamples 8 years ago
parent af7ab33ad3
commit d8570d8c30

@ -108,7 +108,7 @@ class MysqlTransactions
public:
bool
select(const string& address)
select(const string& address, vector<XmrTransaction>& txs)
{
static shared_ptr<Query> query;
@ -121,18 +121,14 @@ public:
query = shared_ptr<Query>(new Query(q));
}
try
{
vector<XmrTransaction> res;
query->storein(res, address);
query->storein(txs, address);
if (!res.empty())
if (!txs.empty())
{
account = res.at(0);
return true;
}
}
catch (mysqlpp::Exception& e)
{

@ -110,10 +110,6 @@ struct XmrTransaction : public Transactions
using Transactions::Transactions;
// viewkey is not stored in mysql db or anywhere
// so need to be populated when user logs in.
string viewkey;
json
to_json() const
{

Loading…
Cancel
Save