FIX: Dont show alert if user cancels willingly

This commit is contained in:
Marcos Rodriguez Velez 2024-03-23 17:33:10 -04:00
parent b3fb057dd7
commit 6e368d66f7
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7
2 changed files with 5 additions and 1 deletions

View file

@ -14,10 +14,13 @@ const _shareOpen = async (filePath: string) => {
return await Share.open({
url: 'file://' + filePath,
saveToFiles: isDesktop,
// @ts-ignore: Website claims this propertie exists, but TS cant find it. Send anyways.
useInternalStorage: Platform.OS === 'android',
failOnCancel: false,
})
.catch(error => {
presentAlert({ message: error.message });
console.log(error);
presentAlert({ message: error.message });
})
.finally(() => {
RNFS.unlink(filePath);

View file

@ -358,6 +358,7 @@ const WalletDetails = () => {
Share.open({
url: 'file://' + filePath,
saveToFiles: isDesktop,
failOnCancel: false,
})
.catch(error => {
console.log(error);