diff --git a/web/apps/photos/src/utils/collection.ts b/web/apps/photos/src/utils/collection.ts index 564b4b2688..04f64d2345 100644 --- a/web/apps/photos/src/utils/collection.ts +++ b/web/apps/photos/src/utils/collection.ts @@ -22,7 +22,6 @@ import { updateMagicMetadata } from "@/new/photos/services/magic-metadata"; import { safeDirectoryName } from "@/new/photos/utils/native-fs"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import type { User } from "@ente/shared/user/types"; -import bs58 from "bs58"; import { t } from "i18next"; import { addToCollection, @@ -177,21 +176,6 @@ async function createCollectionDownloadFolder( return collectionDownloadPath; } -export function appendCollectionKeyToShareURL( - url: string, - collectionKey: string, -) { - if (!url) { - return null; - } - - const sharableURL = new URL(url); - - const bytes = Buffer.from(collectionKey, "base64"); - sharableURL.hash = bs58.encode(bytes); - return sharableURL.href; -} - const _intSelectOption = (i: number) => { const label = i === 0 ? t("NO_DEVICE_LIMIT") : i.toString(); return { label, value: i }; diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md index a3c6cc5eef..11937b95c7 100644 --- a/web/docs/dependencies.md +++ b/web/docs/dependencies.md @@ -160,6 +160,9 @@ For more details, see [translations.md](translations.md). identifiers. For one particular use case, we also need [uuid](https://github.com/uuidjs/uuid) for UUID v4 generation. +- [bs58](https://github.com/cryptocoinjs/bs58) is used for base-58 conversion + (used for encoding the collection key to use as the hash in the share URL). + - [debounce](https://github.com/sindresorhus/debounce) and its promise-supporting sibling [pDebounce](https://github.com/sindresorhus/p-debounce) are used for