From fd57a084eddc0bbc9bd536b6c598c0cd5f8c8aaa Mon Sep 17 00:00:00 2001 From: Andreas Richter <708186+richtera@users.noreply.github.com> Date: Fri, 28 Jun 2024 06:17:27 -0400 Subject: [PATCH] Update src/lib/encodeKeyName.ts Co-authored-by: Jean Cvllr <31145285+CJ42@users.noreply.github.com> --- src/lib/encodeKeyName.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/encodeKeyName.ts b/src/lib/encodeKeyName.ts index a1cb1a8e..8c3c76a4 100644 --- a/src/lib/encodeKeyName.ts +++ b/src/lib/encodeKeyName.ts @@ -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.`,