Skip to content

Commit

Permalink
fix hex strings
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Nov 2, 2024
1 parent 4b00bc2 commit c25898f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ function toHex(value: BytesLike): string {
hexToBytes(value); // assert hex string
return value;
} else if (value instanceof Uint8Array) {
return bytesToHex(value);
return '0x' + bytesToHex(value);
} else {
return bytesToHex(new Uint8Array(value));
return '0x' + bytesToHex(new Uint8Array(value));
}

Check warning on line 25 in src/bytes.ts

View check run for this annotation

Codecov / codecov/patch

src/bytes.ts#L24-L25

Added lines #L24 - L25 were not covered by tests
}

Expand Down

0 comments on commit c25898f

Please sign in to comment.