From 3b36ec90ccd0d370fe14de81156b14a7bb165eb0 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 21 Apr 2021 19:09:29 -0700 Subject: [PATCH] :fire: removed recieving --- include/bank.hpp | 3 +-- include/transactions.hpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/bank.hpp b/include/bank.hpp index 9425132..95584ae 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -180,7 +180,6 @@ public: Json::Value GetLogs(const std::string &name, const std::string &attempt) { - Json::Value res; bool state = false; users.if_contains(name, [&state, &attempt](const User &u) { state = XXH3_64bits(attempt.data(), attempt.size()) == u.password; @@ -188,6 +187,7 @@ public: if (state) { + Json::Value res; logs.if_contains(name, [&res](const Log &l) { for (uint32_t i = l.data.size() - 1; i >= 0; --i) { @@ -198,7 +198,6 @@ public: res[99 - i]["to"] = l.data[i].to; res[99 - i]["from"] = l.data[i].from; res[99 - i]["amount"] = l.data[i].amount; - res[99 - i]["recieving"] = l.data[i].recieving; } }); return res; diff --git a/include/transactions.hpp b/include/transactions.hpp index 1d6f510..29f98f2 100644 --- a/include/transactions.hpp +++ b/include/transactions.hpp @@ -5,7 +5,6 @@ struct Transaction { std::string from = "", to = ""; uint32_t amount = 0; - bool recieving = false; void Concatinate(std::string &s) { @@ -19,7 +18,7 @@ struct Transaction } Transaction() = default; - Transaction(std::string from_str, std::string to_str, uint32_t amount, bool recieving) : amount(amount), recieving(recieving) + Transaction(std::string from_str, std::string to_str, uint32_t amount) : amount(amount) { Concatinate(from_str); Concatinate(to_str);