diff --git a/src/utils/bzz-address.ts b/src/utils/bzz-address.ts index 181c3b5b..579b922f 100644 --- a/src/utils/bzz-address.ts +++ b/src/utils/bzz-address.ts @@ -19,6 +19,10 @@ export class BzzAddress { const parts = url.split('/') this.hash = parts[0].toLowerCase() + if (this.hash.startsWith('0x')) { + this.hash = this.hash.slice(2) + } + if (!/[a-z0-9]{64,128}/.test(this.hash)) { throw new CommandLineError('Invalid BZZ hash: expected 64 or 128 long hexadecimal hash') }