diff options
author | Yigit Sever | 2021-04-16 03:55:38 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-16 03:55:38 +0300 |
commit | f98766d8d989c18b2150b91463fba1f9de812658 (patch) | |
tree | ce20af5f0e9e57b5b66f20eb30c15ece18236a4e /src/handlers.rs | |
parent | 90525af1b50219801a019842bc635ea08f9f93d9 (diff) | |
parent | f759c6b4da459ae2544c6cb5b0e19e4367fef57f (diff) | |
download | gradecoin-f98766d8d989c18b2150b91463fba1f9de812658.tar.gz gradecoin-f98766d8d989c18b2150b91463fba1f9de812658.tar.bz2 gradecoin-f98766d8d989c18b2150b91463fba1f9de812658.zip |
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index 3b62ef8..e76e72f 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -609,9 +609,11 @@ pub async fn authorized_propose_transaction( | |||
609 | // it has been changed since | 609 | // it has been changed since |
610 | 610 | ||
611 | let hashed_transaction = Md5::digest(&serde_json::to_vec(&new_transaction).unwrap()); | 611 | let hashed_transaction = Md5::digest(&serde_json::to_vec(&new_transaction).unwrap()); |
612 | 612 | println!("{:?}", new_transaction); | |
613 | println!("{:?}", &serde_json::to_vec(&new_transaction).unwrap()); | ||
614 | println!("{:x}", hashed_transaction); | ||
613 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { | 615 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { |
614 | debug!( | 616 | println!( |
615 | "the hash of the request {:x} did not match the hash given in jwt {:?}", | 617 | "the hash of the request {:x} did not match the hash given in jwt {:?}", |
616 | hashed_transaction, token_payload.claims.tha | 618 | hashed_transaction, token_payload.claims.tha |
617 | ); | 619 | ); |