diff --git a/config/config.json b/config/config.json index e65d6e9..52acf31 100755 --- a/config/config.json +++ b/config/config.json @@ -34,7 +34,7 @@ "wallet_import" : { "_comment": "if fee is 0, then importing is free. fee is in base 1e12, e.g., 0.1 xmr is 0.1 x 1e12 = 100000000000", - "fee" : 0, + "fee" : 1000000, "testnet" : { "address" : "9tzmPMTViHYM3z6NAgQni1Qm1Emzxy5hQFibPgWD3LVTAz91yok5Eni1pH6zKhBHzpTU15GZooPHSGHXFvFuXEdmEG2sWAZ", diff --git a/src/OpenMoneroRequests.cpp b/src/OpenMoneroRequests.cpp index 2c75a79..ed62399 100755 --- a/src/OpenMoneroRequests.cpp +++ b/src/OpenMoneroRequests.cpp @@ -76,7 +76,7 @@ OpenMoneroRequests::login(const shared_ptr 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, 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"},