MCPcopy
hub / github.com/BlueWallet/BlueWallet / useScreenProtect

Function useScreenProtect

hooks/useScreenProtect.ts:5–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useCallback } from 'react';
4
5export const useScreenProtect = () => {
6 const enableScreenProtect = useCallback(async () => {
7 if (isDesktop) return;
8 await CaptureProtection.prevent();
9 }, []);
10
11 const disableScreenProtect = useCallback(async () => {
12 if (isDesktop) return;
13 await CaptureProtection.allow();
14 }, []);
15
16 const isScreenBeingRecorded = useCallback(async () => {
17 if (isDesktop) return false;
18 return await CaptureProtection.isScreenRecording();
19 }, []);
20
21 return {
22 enableScreenProtect,
23 disableScreenProtect,
24 isScreenBeingRecorded,
25 };
26};

Callers 11

SendCreateFunction · 0.90
WalletXpubFunction · 0.90
WalletExportFunction · 0.90
WalletAddressesFunction · 0.90
WalletsAddMultisigStep2Function · 0.90
ImportWalletDiscoveryFunction · 0.90
PleaseBackupFunction · 0.90
ImportWalletFunction · 0.90
PleaseBackupLNDHubFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected