diff options
author | alpaylan | 2021-04-16 03:54:29 +0300 |
---|---|---|
committer | alpaylan | 2021-04-16 03:54:29 +0300 |
commit | 4ad38fe7b8936245102ca9acbeea031f11640533 (patch) | |
tree | c7926a63472482cbeef7484ef881283deec74c88 /src | |
parent | 752b05888c3309538a9a8fd3b87b8dd6b510e37e (diff) | |
download | gradecoin-4ad38fe7b8936245102ca9acbeea031f11640533.tar.gz gradecoin-4ad38fe7b8936245102ca9acbeea031f11640533.tar.bz2 gradecoin-4ad38fe7b8936245102ca9acbeea031f11640533.zip |
work on post auth transaction 201 test
Diffstat (limited to 'src')
-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 | ); |