diff options
author | alpaylan | 2021-04-16 04:19:40 +0300 |
---|---|---|
committer | alpaylan | 2021-04-16 04:19:40 +0300 |
commit | 8ecc2a504533cb49e58f0a3f456a1ed812b69b65 (patch) | |
tree | 5ddaa2da5ccaf2b1483721dc28f3640c6381b6e4 /src/handlers.rs | |
parent | f98766d8d989c18b2150b91463fba1f9de812658 (diff) | |
download | gradecoin-8ecc2a504533cb49e58f0a3f456a1ed812b69b65.tar.gz gradecoin-8ecc2a504533cb49e58f0a3f456a1ed812b69b65.tar.bz2 gradecoin-8ecc2a504533cb49e58f0a3f456a1ed812b69b65.zip |
work on post auth transaction 201 test
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index e76e72f..376d079 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -608,10 +608,7 @@ pub async fn authorized_propose_transaction( | |||
608 | // this transaction was already checked for correctness at custom_filters, we can panic here if | 608 | // this transaction was already checked for correctness at custom_filters, we can panic here if |
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_string(&new_transaction).unwrap()).as_ref()); |
612 | println!("{:?}", new_transaction); | ||
613 | println!("{:?}", &serde_json::to_vec(&new_transaction).unwrap()); | ||
614 | println!("{:x}", hashed_transaction); | ||
615 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { | 612 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { |
616 | println!( | 613 | println!( |
617 | "the hash of the request {:x} did not match the hash given in jwt {:?}", | 614 | "the hash of the request {:x} did not match the hash given in jwt {:?}", |