aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
diff options
context:
space:
mode:
authoralpaylan2021-04-14 01:05:40 +0300
committeralpaylan2021-04-14 01:05:40 +0300
commite76eb8bd4aba5455cd23a71000b66d3a83608789 (patch)
tree1142c712c2495066804ffde273140299c5b0ff43 /src/handlers.rs
parent2354e90ff0aff42b420eefd2afb2166169ec5857 (diff)
downloadgradecoin-e76eb8bd4aba5455cd23a71000b66d3a83608789.tar.gz
gradecoin-e76eb8bd4aba5455cd23a71000b66d3a83608789.tar.bz2
gradecoin-e76eb8bd4aba5455cd23a71000b66d3a83608789.zip
remove unused part.
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index be2a020..cc71ba7 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -303,18 +303,7 @@ pub async fn authorized_propose_transaction(
303 StatusCode::BAD_REQUEST, 303 StatusCode::BAD_REQUEST,
304 )); 304 ));
305 } 305 }
306 } else if new_transaction.by == new_transaction.target { 306 } else { // todo: add bank mechanism
307 if internal_user.balance < new_transaction.amount {
308 return Ok(warp::reply::with_status(
309 warp::reply::json(&GradeCoinResponse {
310 res: ResponseType::Error,
311 message: "Bank does not have enough balance"
312 .to_owned(),
313 }),
314 StatusCode::BAD_REQUEST,
315 ));
316 }
317 } else {
318 return Ok(warp::reply::with_status( 307 return Ok(warp::reply::with_status(
319 warp::reply::json(&GradeCoinResponse { 308 warp::reply::json(&GradeCoinResponse {
320 res: ResponseType::Error, 309 res: ResponseType::Error,