mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
Update blue_modules/clipboard.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
f77df0e949
commit
048ac83bf2
@ -17,8 +17,13 @@ export const isReadClipboardAllowed = async (): Promise<boolean> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setReadClipboardAllowed = (value: boolean): Promise<void> => {
|
export const setReadClipboardAllowed = async (value: boolean): Promise<void> => {
|
||||||
return AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(!!value));
|
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<string | undefined> => {
|
export const getClipboardContent = async (): Promise<string | undefined> => {
|
||||||
|
Loading…
Reference in New Issue
Block a user