diff options
author | alpaylan | 2021-04-14 01:05:40 +0300 |
---|---|---|
committer | alpaylan | 2021-04-14 01:05:40 +0300 |
commit | e4777845667474083cf916aaa60e04ea89d17365 (patch) | |
tree | 3bc53dbee6462e751e56b5108d43a498f82dbe56 /src/handlers.rs | |
parent | 75a19ffdf7b0455946a73de73733eae475b8bc5e (diff) | |
download | gradecoin-e4777845667474083cf916aaa60e04ea89d17365.tar.gz gradecoin-e4777845667474083cf916aaa60e04ea89d17365.tar.bz2 gradecoin-e4777845667474083cf916aaa60e04ea89d17365.zip |
remove unused part.
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 13 |
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, |