Skip to content

Commit

Permalink
Update verify.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar authored Sep 8, 2024
1 parent cf417a6 commit 0e4d593
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/rooch/src/commands/account/commands/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ impl CommandAction<Option<bool>> for VerifyCommand {
SignData::new_without_tx_hash(MESSAGE_INFO_PREFIX.to_vec(), self.message.to_bytes());
let encoded_sign_data = sign_data.encode();
let message_hash = sha2_256_of(&encoded_sign_data).0.to_vec();
let _ = self.signature.into_inner().verify(&message_hash);
let verify_result = self.signature.into_inner().verify(&message_hash).is_ok();

if self.json {
Ok(Some(true))
Ok(Some(verify_result))
} else {
println!("Verification succeeded");
println!("Verification result: {}", verify_result);
Ok(None)
}
}
Expand Down

0 comments on commit 0e4d593

Please sign in to comment.