diff --git a/common/strings.js b/common/strings.js index 48915295..505138d4 100644 --- a/common/strings.js +++ b/common/strings.js @@ -99,20 +99,6 @@ export const createQueryParams = (params) => { return query; }; -export const getCIDFromIPFS = (url) => { - // NOTE(andrew) - const cid = url.includes("/ipfs/") - ? // pull cid from a path format gateway - url.split("/ipfs/")[1] - : // pull cid from a subdomain format gateway - url.match( - // regex here performs https://{cid}.ipfs.slate.textile.io => [https://{cid}, {cid}] - /(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/i - )[1]; - - return cid; -}; - export const formatAsUploadMessage = (added, skipped, slate = false) => { let message = `${added || 0} file${added !== 1 ? "s" : ""} added${ slate ? " to collection" : ""