|
|
|
@ -76,7 +76,7 @@ OpenMoneroRequests::login(const shared_ptr<Session> session, const Bytes & body)
|
|
|
|
|
// marks if this is new account creation or not
|
|
|
|
|
bool new_account_created {false};
|
|
|
|
|
|
|
|
|
|
auto acc = select_account(xmr_address, view_key);
|
|
|
|
|
auto acc = select_account(xmr_address, view_key, false);
|
|
|
|
|
|
|
|
|
|
// first check if new account
|
|
|
|
|
// select this account if its existing one
|
|
|
|
@ -84,11 +84,7 @@ OpenMoneroRequests::login(const shared_ptr<Session> session, const Bytes & body)
|
|
|
|
|
{
|
|
|
|
|
// account does not exist, so create new one
|
|
|
|
|
// for this address
|
|
|
|
|
|
|
|
|
|
acc = create_account(xmr_address, view_key);
|
|
|
|
|
|
|
|
|
|
// insert the new account into the mysql
|
|
|
|
|
if (!acc)
|
|
|
|
|
if (!(acc = create_account(xmr_address, view_key)))
|
|
|
|
|
{
|
|
|
|
|
// if creating account failed
|
|
|
|
|
j_response = json {{"status", "error"},
|
|
|
|
|