diff --git a/CHANGELOG.md b/CHANGELOG.md index 0166f28002..32edf457b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Introduce full screen selector for mobile in place of dropdown - Fix wrong estimated confirmation time for ERC20 tokens. - Enable unlock test wallet in testnet +- Change notes export file type to JSON Lines # v4.47.2 - Linux: fix compatiblity with some versions of Mesa that are incompatible with the bundled wayland libraries diff --git a/backend/notes.go b/backend/notes.go index e20a45174b..e1b49b2c54 100644 --- a/backend/notes.go +++ b/backend/notes.go @@ -158,7 +158,7 @@ func (backend *Backend) ExportNotes() error { if err != nil { return err } - name := fmt.Sprintf("%s-notes.txt", time.Now().Format("2006-01-02-at-15-04-05")) + name := fmt.Sprintf("%s-notes.jsonl", time.Now().Format("2006-01-02-at-15-04-05")) suggestedPath := filepath.Join(exportsDir, name) path := backend.Environment().GetSaveFilename(suggestedPath) if path == "" { diff --git a/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/MainActivity.java b/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/MainActivity.java index 9972d0d189..edf95ca9c5 100644 --- a/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/MainActivity.java +++ b/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/MainActivity.java @@ -51,6 +51,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -352,13 +353,8 @@ public boolean onShowFileChooser(WebView webView, ValueCallback filePathC MainActivity.this.filePathCallback = filePathCallback; String[] mimeTypes = fileChooserParams.getAcceptTypes(); String fileType = "*/*"; - if (mimeTypes.length == 1) { - // import notes form uses .txt file type, but is not supported here. - if (".txt".equals(mimeTypes[0])) { - fileType = "text/plain"; - } else if (MimeTypeMap.getSingleton().hasMimeType(mimeTypes[0])) { - fileType = mimeTypes[0]; - } + if (mimeTypes.length == 1 && MimeTypeMap.getSingleton().hasMimeType(mimeTypes[0])) { + fileType = mimeTypes[0]; } mGetContent.launch(fileType); return true; diff --git a/frontends/web/src/routes/settings/components/appearance/notesImport.tsx b/frontends/web/src/routes/settings/components/appearance/notesImport.tsx index 658968a474..6ced4bec49 100644 --- a/frontends/web/src/routes/settings/components/appearance/notesImport.tsx +++ b/frontends/web/src/routes/settings/components/appearance/notesImport.tsx @@ -32,7 +32,7 @@ export const NotesImport = () => { type="file" className={style.fileInput} ref={fileInputRef} - accept=".txt" + accept=".jsonl,.txt" onChange={async (e: React.ChangeEvent) => { setImportDisabled(e.target.files === null || e.target.files.length === 0); if (fileInputRef.current === null) {