Skip to content

Commit

Permalink
Update src/lib/encodeKeyName.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jean Cvllr <[email protected]>
  • Loading branch information
richtera and CJ42 authored Jun 28, 2024
1 parent 5013be9 commit fd57a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/encodeKeyName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const encodeDynamicKeyPart = (
`Wrong value: ${value} for dynamic key with type: ${type}. Value is not in hex.`,
);
}
const valueWithoutPrefix = value.replace('0x', '');
const valueWithoutPrefix = stripHexPrefix(value);
if (valueWithoutPrefix.length > size * 2) {
throw new Error(
`Wrong value: ${value} for dynamic key with type: ${type}. Value longer than ${size} bytes.`,
Expand Down

0 comments on commit fd57a08

Please sign in to comment.