Merge pull request #5790 from BlueWallet/error

FIX: Show alert with error message when a selected file isn't valid
This commit is contained in:
GLaDOS 2023-10-28 21:35:32 +01:00 committed by GitHub
commit 3af8eae9fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,6 +199,9 @@ const showFilePickerAndReadFile = async function () {
file = await RNFS.readFile(uri);
return { data: file, uri: decodeURI(res.uri) };
} catch (err) {
if (!DocumentPicker.isCancel(err)) {
alert(err.message);
}
return { data: false, uri: false };
}
};