diff --git a/apps/browser-extension-wallet/src/types/local-storage.ts b/apps/browser-extension-wallet/src/types/local-storage.ts
index cca276bb4..4e7b152d1 100644
--- a/apps/browser-extension-wallet/src/types/local-storage.ts
+++ b/apps/browser-extension-wallet/src/types/local-storage.ts
@@ -54,4 +54,5 @@ export interface ILocalStorage {
multidelegationFirstVisitSincePortfolioPersistence?: boolean;
unconfirmedTransactions: UnconfirmedTransaction[];
stakingBrowserPreferences: StakingBrowserPreferences;
+ showPinExtension?: boolean;
}
diff --git a/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.module.scss b/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.module.scss
index 13eb2fd04..b78daef77 100644
--- a/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.module.scss
+++ b/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.module.scss
@@ -118,3 +118,10 @@ $main-gap: 49px;
@include content_grid($col-width-large, $grid-gap-large);
}
}
+
+.pinExtension {
+ position: absolute;
+ top: 10px;
+ right: 80px;
+ z-index: 100;
+}
diff --git a/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.tsx b/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.tsx
index b70c0faf0..7d4ed1d9d 100644
--- a/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.tsx
+++ b/apps/browser-extension-wallet/src/views/browser-view/components/Layout/Layout.tsx
@@ -12,6 +12,8 @@ import { DrawerContent, DrawerUIContainer } from '../Drawer';
import { useNetworkError } from '@hooks/useNetworkError';
import { LeftSidePanel } from '../LeftSidePanel';
import styles from './Layout.module.scss';
+import { PinExtension } from '@views/browser/features/wallet-setup/components/PinExtension';
+import { useLocalStorage } from '@hooks';
interface LayoutProps {
children: React.ReactNode;
@@ -21,6 +23,7 @@ interface LayoutProps {
const toastThrottle = 500;
const isFlexible = process.env.USE_DESKTOP_LAYOUT === 'true';
+const PIN_EXTENSION_TIMEOUT = 5000;
export const Layout = ({ children, drawerUIDefaultContent, isFullWidth }: LayoutProps): React.ReactElement => {
const { t } = useTranslation();
@@ -28,6 +31,8 @@ export const Layout = ({ children, drawerUIDefaultContent, isFullWidth }: Layout
const { theme, setTheme } = useTheme();
const backgroundServices = useBackgroundServiceAPIContext();
+ const [showPinExtension, { updateLocalStorage: setShowPinExtension }] = useLocalStorage('showPinExtension', true);
+
useEffect(() => {
const openDrawer = async () => {
const backgroundStorage = await backgroundServices.getBackgroundStorage();
@@ -50,6 +55,13 @@ export const Layout = ({ children, drawerUIDefaultContent, isFullWidth }: Layout
return () => subscription.unsubscribe();
}, [backgroundServices, setTheme]);
+ useEffect(() => {
+ const timer = setTimeout(() => {
+ setShowPinExtension(false);
+ }, PIN_EXTENSION_TIMEOUT);
+ return () => clearTimeout(timer);
+ }, [setShowPinExtension]);
+
const debouncedToast = useMemo(() => debounce(toast.notify, toastThrottle), []);
const showNetworkError = useCallback(
() => debouncedToast({ text: t('general.errors.networkError') }),
@@ -64,6 +76,11 @@ export const Layout = ({ children, drawerUIDefaultContent, isFullWidth }: Layout
className={classnames(styles.layoutGridContainer, isFullWidth && styles.fullWidth, isFlexible && styles.flexible)}
>