Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rantan committed Nov 29, 2024
1 parent 40166f8 commit 54dc38c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tapyrus-wallet-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,12 +1548,18 @@ mod test {
let wallet = get_wallet();
let message = "message".to_string();
let GetNewAddressResult { public_key, .. } = wallet.get_new_address(None).unwrap();
let sig = wallet.sign_message(public_key.clone(), message.clone()).unwrap();
let sig = wallet
.sign_message(public_key.clone(), message.clone())
.unwrap();

assert!(wallet.verify_sign(public_key.clone(), message.clone(), sig.clone()).unwrap());
assert!(wallet
.verify_sign(public_key.clone(), message.clone(), sig.clone())
.unwrap());

let message = "another message".to_string();
assert!(!wallet.verify_sign(public_key.clone(), message.clone(), sig.clone()).unwrap());
assert!(!wallet
.verify_sign(public_key.clone(), message.clone(), sig.clone())
.unwrap());
}

#[test]
Expand Down

0 comments on commit 54dc38c

Please sign in to comment.