mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
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:
commit
3af8eae9fc
1 changed files with 3 additions and 0 deletions
|
@ -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 };
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue