diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts b/packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts index 649def599..eda2afd8d 100644 --- a/packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts +++ b/packages/taler-wallet-webextension/src/hooks/useClipboardPermissions.ts @@ -23,12 +23,14 @@ import { platform } from "../platform/api.js"; export function useClipboardPermissions(): ToggleHandler { const [enabled, setEnabled] = useState(false); const [error, setError] = useState<TalerError | undefined>(); - const api = useBackendContext() + const api = useBackendContext(); const toggle = async (): Promise<void> => { - return handleClipboardPerm(enabled, setEnabled, api.background).catch((e) => { - setError(TalerError.fromException(e)); - }); + return handleClipboardPerm(enabled, setEnabled, api.background).catch( + (e) => { + setError(TalerError.fromException(e)); + }, + ); }; useEffect(() => { |