From 3975041176a34285926474a9f2cac42d8e991a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Vi=C3=A9not?= Date: Fri, 6 Dec 2024 00:16:01 +0100 Subject: [PATCH] Remove (now unused) blob2topic() utility. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon ViƩnot --- src/utils/URLUtils.ts | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/utils/URLUtils.ts b/src/utils/URLUtils.ts index 3dcff237c..0c20e51dd 100644 --- a/src/utils/URLUtils.ts +++ b/src/utils/URLUtils.ts @@ -18,7 +18,6 @@ * */ -import {EntityID} from "@/utils/EntityID"; import {CID} from "multiformats"; export function blob2URL(blob: string | null, ipfsGateway: string | null, arweaveServer: string | null): string | null { @@ -44,28 +43,6 @@ export function blob2URL(blob: string | null, ipfsGateway: string | null, arweav return result } -export function blob2Topic(blob: string | null): string | null { - let result: string | null - let id: string - - if (blob !== null) { - if (blob.startsWith('hcs://') && blob.length > 6) { - const i = blob.lastIndexOf('/'); - id = blob.substring(i + 1); - } else { - id = blob - } - if (EntityID.parse(id) !== null) { - result = id - } else { - result = null - } - } else { - result = null - } - return result -} - export function isSecureURL(blob: string): boolean { let isValid: boolean try {