()
| 76 | * Opens & reads *.psbt files, and returns base64 psbt. FALSE if something went wrong (wont throw). |
| 77 | */ |
| 78 | export const openSignedTransaction = async function (): Promise<string | false> { |
| 79 | try { |
| 80 | const [res] = await pick({ |
| 81 | type: [types.allFiles], |
| 82 | }); |
| 83 | |
| 84 | return await _readPsbtFileIntoBase64(res.uri); |
| 85 | } catch (err) { |
| 86 | if (!isCancel(err)) { |
| 87 | presentAlert({ message: loc.send.details_no_signed_tx }); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | return false; |
| 92 | }; |
| 93 | |
| 94 | const _readPsbtFileIntoBase64 = async function (uri: string): Promise<string> { |
| 95 | const base64 = await RNFS.readFile(uri, 'base64'); |
nothing calls this directly
no test coverage detected