Merge pull request #911 from status-im/lower-case-hex

This commit is contained in:
fryorcraken.eth 2022-08-29 16:44:54 +10:00 committed by GitHub
commit aa40959375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}