diff options
author | alpaylan | 2021-04-16 03:54:29 +0300 |
---|---|---|
committer | alpaylan | 2021-04-16 03:54:29 +0300 |
commit | f759c6b4da459ae2544c6cb5b0e19e4367fef57f (patch) | |
tree | 6249c732906352336fa38c371b6ec9c2a5ea7dc9 /src/handlers.rs | |
parent | e923a69e503c81a38736f9eb3ea65e4c8551dee5 (diff) | |
download | gradecoin-f759c6b4da459ae2544c6cb5b0e19e4367fef57f.tar.gz gradecoin-f759c6b4da459ae2544c6cb5b0e19e4367fef57f.tar.bz2 gradecoin-f759c6b4da459ae2544c6cb5b0e19e4367fef57f.zip |
work on post auth transaction 201 test
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 88f9a80..b7b1007 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -608,9 +608,11 @@ pub async fn authorized_propose_transaction( | |||
608 | // it has been changed since | 608 | // it has been changed since |
609 | 609 | ||
610 | let hashed_transaction = Md5::digest(&serde_json::to_vec(&new_transaction).unwrap()); | 610 | let hashed_transaction = Md5::digest(&serde_json::to_vec(&new_transaction).unwrap()); |
611 | 611 | println!("{:?}", new_transaction); | |
612 | println!("{:?}", &serde_json::to_vec(&new_transaction).unwrap()); | ||
613 | println!("{:x}", hashed_transaction); | ||
612 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { | 614 | if token_payload.claims.tha != format!("{:x}", hashed_transaction) { |
613 | debug!( | 615 | println!( |
614 | "the hash of the request {:x} did not match the hash given in jwt {:?}", | 616 | "the hash of the request {:x} did not match the hash given in jwt {:?}", |
615 | hashed_transaction, token_payload.claims.tha | 617 | hashed_transaction, token_payload.claims.tha |
616 | ); | 618 | ); |