From 8ecc2a504533cb49e58f0a3f456a1ed812b69b65 Mon Sep 17 00:00:00 2001 From: alpaylan Date: Fri, 16 Apr 2021 04:19:40 +0300 Subject: work on post auth transaction 201 test --- src/handlers.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/handlers.rs') 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( // this transaction was already checked for correctness at custom_filters, we can panic here if // it has been changed since - let hashed_transaction = Md5::digest(&serde_json::to_vec(&new_transaction).unwrap()); - println!("{:?}", new_transaction); - println!("{:?}", &serde_json::to_vec(&new_transaction).unwrap()); - println!("{:x}", hashed_transaction); + let hashed_transaction = Md5::digest((&serde_json::to_string(&new_transaction).unwrap()).as_ref()); if token_payload.claims.tha != format!("{:x}", hashed_transaction) { println!( "the hash of the request {:x} did not match the hash given in jwt {:?}", -- cgit v1.2.3-70-g09d2