mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-27 20:55:59 +00:00
Merge pull request #911 from status-im/lower-case-hex
This commit is contained in:
commit
aa40959375
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user