Skip to content

Commit

Permalink
Working signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
poplexity committed Dec 29, 2023
1 parent 42bc55d commit 8ee5423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/antelope/src/chain/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Signature {
let r = signature.r().to_bytes().to_vec();
let s = signature.s().to_bytes().to_vec();
let mut data: Vec<u8> = Vec::new();
let recid = recovery.to_byte();
let recid = recovery.to_byte() + 27;

if r.len() != 32 || s.len() != 32 {
return Err(String::from("r and s values should both have a size of 32"));
Expand Down
4 changes: 2 additions & 2 deletions crates/antelope/tests/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ fn transaction() {
decoder.unpack(transfer_decoded);
assert_eq!(transfer_decoded.from, name!("foo"));
/*
const transfer = transaction.actions[0].decodeData(Transfer)
assert.equal(String(transfer.from), 'foo')
const signed = SignedTransaction.from({
...transaction,
Expand Down Expand Up @@ -563,6 +561,8 @@ fn transaction_signing_data_and_digest() {
let digest = trx.signing_digest(&chain_id.data.to_vec());
let expected_digest_hex= "59fa6b615e3ce1b539ae27bc2398448c1374d2d3c97fe2bbba2c37c118631848";
assert_eq!(bytes_to_hex(&digest), expected_digest_hex);


}

/*
Expand Down

0 comments on commit 8ee5423

Please sign in to comment.