diff --git a/extension/src/popup/components/account/CollectibleDetail/index.tsx b/extension/src/popup/components/account/CollectibleDetail/index.tsx
index 545c4db588..b2647ccca0 100644
--- a/extension/src/popup/components/account/CollectibleDetail/index.tsx
+++ b/extension/src/popup/components/account/CollectibleDetail/index.tsx
@@ -19,6 +19,8 @@ import { settingsNetworkDetailsSelector } from "popup/ducks/settings";
import { publicKeySelector } from "popup/ducks/accountServices";
import { collectionsSelector } from "popup/ducks/cache";
import { ROUTES } from "popup/constants/routes";
+import { changeCollectibleVisibility } from "@shared/api/internal";
+import { AssetVisibility } from "@shared/api/types/types";
import { useCollectibleDetail } from "./hooks/useCollectibleDetail";
import {
@@ -37,7 +39,7 @@ export interface SelectedCollectible {
export const CollectibleDetail = ({
selectedCollectible,
handleItemClose,
- isHidden,
+ isHidden = false,
}: {
selectedCollectible: SelectedCollectible;
handleItemClose: () => void;
@@ -97,6 +99,19 @@ export const CollectibleDetail = ({
navigateTo(ROUTES.sendPayment, navigate, queryParams);
};
+ const handleToggleCollectibleVisibility = async () => {
+ const collectibleKey = `${selectedCollectible.collectionAddress}:${selectedCollectible.tokenId}`;
+ await changeCollectibleVisibility({
+ collectibleKey,
+ collectibleVisibility: isHidden
+ ? "visible"
+ : ("hidden" as AssetVisibility),
+ activePublicKey: publicKey || "",
+ });
+ setIsPopoverOpen(false);
+ handleItemClose();
+ };
+
return (
@@ -143,12 +158,19 @@ export const CollectibleDetail = ({
{t("View on stellar.expert")}