From 3053d27b2c0d04bcd8eb3776b604446a3a149ca8 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 29 Aug 2022 16:37:05 +1000 Subject: [PATCH] feat: hexToBytes can handle Ethereum address with case checksum --- src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 6b9f0f343a..5c2048d413 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -9,7 +9,7 @@ import { toString } from "uint8arrays/to-string"; export function hexToBytes(hex: string | Uint8Array): Uint8Array { if (typeof hex === "string") { const _hex = hex.replace(/^0x/i, ""); - return fromString(_hex, "base16"); + return fromString(_hex.toLowerCase(), "base16"); } return hex; }