From 4bbd56e5233fec48e94ca5141ce56a17e210c1ed Mon Sep 17 00:00:00 2001
From: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
Date: Thu, 20 Jul 2023 14:11:16 +0200
Subject: [PATCH 01/25] Fix JSON parsing issues when copy & pasting wallet data
from PDF (#2355)
* remove any newline characters when users pastes wallet jsons
* make regex for cleaning text more comprehensive
---
.../import_wallet_account_map.jinja | 56 ++++++++++++-------
1 file changed, 35 insertions(+), 21 deletions(-)
diff --git a/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja b/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja
index 27a44427d..b553ab763 100644
--- a/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja
+++ b/src/cryptoadvance/specter/templates/wallet/new_wallet/components/import_wallet_account_map.jinja
@@ -12,7 +12,7 @@
@@ -34,7 +34,7 @@
{% endif %}
diff --git a/src/cryptoadvance/specter/templates/includes/hwi/hwi.jinja b/src/cryptoadvance/specter/templates/includes/hwi/hwi.jinja
index 33c7aae2c..1b3f08c8e 100644
--- a/src/cryptoadvance/specter/templates/includes/hwi/hwi.jinja
+++ b/src/cryptoadvance/specter/templates/includes/hwi/hwi.jinja
@@ -93,7 +93,7 @@
let retryCounter = 0;
try {
try {
- result = await hwi.enumerate(passphrase, deviceTypes == 'bitbox02');
+ result = await hwi.enumerate(passphrase, true);
} catch (e) {
if (e.message !== 'Fetch is aborted' && e.message !== 'The user aborted a request.') {
throw e;
@@ -122,7 +122,7 @@
}
console.log("Retrying enumerate...");
try {
- result = await hwi.enumerate(passphrase, deviceTypes == 'bitbox02');
+ result = await hwi.enumerate(passphrase, true);
} catch (e) {
if (e.message !== 'Fetch is aborted' && e.message !== 'The user aborted a request.') {
throw e;
diff --git a/src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja b/src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja
index ac5929ad8..9e0a9abc9 100644
--- a/src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja
+++ b/src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja
@@ -1,6 +1,7 @@
{% extends "wallet/components/wallet_tab.jinja" %}
{% include "includes/file-uploader.html" %}
{% include "includes/dnd-textarea.html" %}
+{% include "includes/hwi/hwi.jinja" %}
{% set tab = 'settings' %}
{% block content %}
@@ -21,6 +22,21 @@
{% if wallet.is_multisig %}
{{ _("Devices") }}
+ {% if has_device_for_multisig_registration %}
+
Register Multisig
+
+ {% for device in wallet.devices %}
+ {% if device.supports_multisig_registration %}
+ {% for wallet_key in wallet.keys %}
+ {% set matching_device_key = device.keys | selectattr("fingerprint", "eq", wallet_key.fingerprint) | first %}
+ {% if matching_device_key %}
+ Register on {{ device.name }}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+
+ {% endif %}
{{ wallet.sigs_required }} out of {{ wallet.keys|length }} multisig
{% else %}
{{ _("Device") }}
@@ -358,6 +374,11 @@
document.getElementById('export_specter_format').href = "data:text/json;charset=utf-8," + walletDataSpecterFormat;
});
+ const registerMultisigOnDevice = async (fingerprint) => {
+ const descriptor = '{{ wallet.descriptor }}'
+ await registerMultisig(descriptor, fingerprint)
+ }
+
function toggleKeysList() {
let titleButton = document.getElementById('toggle_keys_list');
let keysList = document.getElementById('keys_list');
From e9dc494d22d89666ea78273c081c9e8f998a814a Mon Sep 17 00:00:00 2001
From: k9ert
Date: Wed, 1 May 2024 12:31:32 +0200
Subject: [PATCH 23/25] Kn/macos signing (#2432)
* chore: migrate from altool to notarytool
* fix litte things in build-common
* add pyenv install in build-osx
* add pyinstaller/electron/signing_logs to gitignore
* chore: migrate from altool to notarytool
* fix little things in build.common
* add pyenv install in build osx
* add pyinatsller electron signing logs to gitignore
* updated build-osx.sh
* fix entitlement
* heavily refactoring the electron app
* polish and improve
* further bugfixing and polishing
* tiny change to improve support of MacOS
* Fix dependency issues
---------
Co-authored-by: Manolis
---
.gitignore | 1 +
.vscode/settings.json | 7 +-
.../electron/build/entitlements.mac.plist | 2 +
pyinstaller/electron/error_logs.html | 37 +-
pyinstaller/electron/helpers.js | 125 ----
pyinstaller/electron/main.js | 561 +-----------------
pyinstaller/electron/package-lock.json | 109 ++--
pyinstaller/electron/package.json | 14 +-
pyinstaller/electron/preload.js | 10 +-
pyinstaller/electron/renderer.js | 22 +
pyinstaller/electron/splash.html | 1 +
pyinstaller/electron/src/config.js | 109 ++++
pyinstaller/electron/src/download.js | 145 +++++
pyinstaller/electron/src/helpers.js | 43 ++
pyinstaller/electron/src/logging.js | 22 +
pyinstaller/electron/src/specterd.js | 189 ++++++
pyinstaller/electron/src/uiHelpers.js | 177 ++++++
pyproject.toml | 2 +-
requirements.txt | 9 +-
tests/install_noded.sh | 15 +-
utils/build-common.sh | 68 ++-
utils/build-osx.sh | 67 ++-
22 files changed, 932 insertions(+), 803 deletions(-)
delete mode 100644 pyinstaller/electron/helpers.js
create mode 100644 pyinstaller/electron/src/config.js
create mode 100644 pyinstaller/electron/src/download.js
create mode 100644 pyinstaller/electron/src/helpers.js
create mode 100644 pyinstaller/electron/src/logging.js
create mode 100644 pyinstaller/electron/src/specterd.js
create mode 100644 pyinstaller/electron/src/uiHelpers.js
diff --git a/.gitignore b/.gitignore
index 1ef352c6e..2f909a404 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ pyinstaller/electron/downloadloc.js
pyinstaller/electron/node_modules
pyinstaller/electron/package-lock.json
pyinstaller/electron/dist
+pyinstaller/electron/signing_logs
pyinstaller/electron/fonts
pyinstaller/electron/typography.css
pyinstaller/electron/output.css
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e137fadb9..60b12ccec 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,9 @@
{
"python.testing.unittestEnabled": false,
- "python.testing.pytestEnabled": true
+ "python.testing.pytestEnabled": true,
+ "editor.formatOnSave": true,
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "[javascript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
}
\ No newline at end of file
diff --git a/pyinstaller/electron/build/entitlements.mac.plist b/pyinstaller/electron/build/entitlements.mac.plist
index 16ee8e8fd..7e5286745 100644
--- a/pyinstaller/electron/build/entitlements.mac.plist
+++ b/pyinstaller/electron/build/entitlements.mac.plist
@@ -2,6 +2,8 @@
+ com.apple.security.cs.allow-jit
+
com.apple.security.cs.allow-unsigned-executable-memory
com.apple.security.device.camera
diff --git a/pyinstaller/electron/error_logs.html b/pyinstaller/electron/error_logs.html
index c1cc6bd41..a9fa6ac09 100644
--- a/pyinstaller/electron/error_logs.html
+++ b/pyinstaller/electron/error_logs.html
@@ -1,23 +1,20 @@
-
-
-
- This window shows you the last 700 lines Logs of the specterApp. This also includes
- the Logs of specterd which are marked as such. It might give you hints on why specter is not coming up properly.
- The best approach is to scroll to the bottom and then search upwards for errors.
- You can find the logfile in [yourHomedirectory]/.specter/specterApp.log.
-
-
-
-
+
+
+
+ This window shows you the last 700 lines Logs of the specterApp. This also includes the Logs of specterd which are
+ marked as such. It might give you hints on why specter is not coming up properly. The best approach is to scroll to the
+ bottom and then search upwards for errors. You can find the logfile in [yourHomedirectory]/.specter/specterApp.log.
+
+
+
-
-
\ No newline at end of file
+
+