Skip to content

Commit

Permalink
Fixed error in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ACken2 committed Apr 5, 2024
1 parent 8b684fa commit b50a502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/Address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class Address {
public static uncompressPublicKey(compressedPublicKey: Buffer): Buffer {
// Initialize elliptic curve
const ec = new EC('secp256k1');
// Try to compress the provided public key
// Try to uncompress the provided public key
try {
// Create a key pair from the compressed public key buffer
const keyPair = ec.keyFromPublic(Buffer.from(compressedPublicKey));
Expand Down
2 changes: 1 addition & 1 deletion test/Verifier.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function generateCompatibleSignatures(base64Signature: string, start: number = 2
const initialRecId = buffer[0];
// Loop through the range and replace the first byte
for (let i = start; i <= end; i++) {
// Only recId with a difference of the multiple of 4 is compatible
// Only header with a difference of the multiple of 4 is compatible since recId is a number from 0 - 3
// For example, if initialRecId is 32, then only 28, 36, 40 are compatible
if (Math.abs(i - initialRecId) % 4 == 0) {
// Copy the buffer to avoid modifying the original data
Expand Down

0 comments on commit b50a502

Please sign in to comment.