From 6c811797ff7aace7e952a42055d663ee5f617f3e Mon Sep 17 00:00:00 2001 From: marcosrdz Date: Sun, 6 Sep 2020 21:47:47 -0400 Subject: [PATCH] ADD: Export file option for macOS --- screen/send/create.js | 6 +++++- screen/send/psbtWithHardwareWallet.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/screen/send/create.js b/screen/send/create.js index 2fa16a817..ce830ea40 100644 --- a/screen/send/create.js +++ b/screen/send/create.js @@ -57,8 +57,12 @@ export default class SendCreate extends Component { await RNFS.writeFile(filePath, this.state.tx); Share.open({ url: 'file://' + filePath, + saveToFiles: true, }) - .catch(error => console.log(error)) + .catch(error => { + console.log(error); + alert(error.message); + }) .finally(() => { RNFS.unlink(filePath); }); diff --git a/screen/send/psbtWithHardwareWallet.js b/screen/send/psbtWithHardwareWallet.js index 1ca9985fc..2ea663b62 100644 --- a/screen/send/psbtWithHardwareWallet.js +++ b/screen/send/psbtWithHardwareWallet.js @@ -290,8 +290,12 @@ export default class PsbtWithHardwareWallet extends Component { await RNFS.writeFile(filePath, typeof this.state.psbt === 'string' ? this.state.psbt : this.state.psbt.toBase64()); Share.open({ url: 'file://' + filePath, + saveToFiles: true, }) - .catch(error => console.log(error)) + .catch(error => { + console.log(error); + alert(error.message); + }) .finally(() => { RNFS.unlink(filePath); });