ADD: Export file option for macOS

This commit is contained in:
marcosrdz 2020-09-06 21:47:47 -04:00 committed by Overtorment
parent ab9492bc38
commit 6c811797ff
2 changed files with 10 additions and 2 deletions

View File

@ -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);
});

View File

@ -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);
});