Skip to content

Commit cb580ca

Browse files
committed
fix: Add strict for isHex back in
1 parent bdf9ab5 commit cb580ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class EIP191Signer {
2020
hashEthereumSignedMessage(message: string | ByteArray): `0x${string}` {
2121
const messageBytes = isBytes(message)
2222
? message
23-
: isHex(message)
23+
: isHex(message, { strict: true })
2424
? hexToBytes(message)
2525
: stringToBytes(message);
2626
const encoder = new TextEncoder();
@@ -46,7 +46,7 @@ export class EIP191Signer {
4646
// data to sign
4747
const dataBytes = isBytes(data)
4848
? data
49-
: isHex(data)
49+
: isHex(data, { strict: true })
5050
? hexToBytes(data)
5151
: stringToBytes(data);
5252
// concatenate it

0 commit comments

Comments
 (0)