diff --git a/blue_modules/clipboard.ts b/blue_modules/clipboard.ts index fdceab12d..7437b5541 100644 --- a/blue_modules/clipboard.ts +++ b/blue_modules/clipboard.ts @@ -17,8 +17,13 @@ export const isReadClipboardAllowed = async (): Promise => { } }; -export const setReadClipboardAllowed = (value: boolean): Promise => { - return AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(!!value)); +export const setReadClipboardAllowed = async (value: boolean): Promise => { + try { + await AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(Boolean(value))); + } catch (error) { + console.error('Failed to set clipboard permission:', error); + throw error; + } }; export const getClipboardContent = async (): Promise => {