diff --git a/README.md b/README.md index 677f627..9e03bf5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ python multiwallet_gui/app.py ``` ## Roadmap: -* Allow user to select limit/offset for receive address verfication * Mainnet/testnet toggle * Add QR code generation on send/receive * Support arbitrary paths diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..536de6f --- /dev/null +++ b/clean.sh @@ -0,0 +1,5 @@ +rm -rf .venv3/ +rm -rf dist/ +rm -rf build/ +rm -rf multiwallet.egg-info/ +find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf \ No newline at end of file diff --git a/multiwallet_gui/receive.py b/multiwallet_gui/receive.py index d4c217b..1cae427 100644 --- a/multiwallet_gui/receive.py +++ b/multiwallet_gui/receive.py @@ -1,6 +1,7 @@ #! /usr/bin/env bash import re + from PyQt5.QtWidgets import ( QApplication, QVBoxLayout, @@ -8,6 +9,7 @@ QLabel, QPlainTextEdit, QPushButton, + QSpinBox, ) from multiwallet_gui.helper import _clean_submisission, _msgbox_err, _is_libsec_enabled @@ -112,13 +114,26 @@ def __init__(self): self.descriptorLabel = QLabel("Wallet Descriptor") self.descriptorLabel.setToolTip( - "This extended public key information is used to generate your bitcoin addresses." + "This extended public key information (from all your hardware wallets) is used to generate your bitcoin addresses." + "

From Specter-Desktop: Wallet > Settings > Export To Wallet Software > Export > Copy wallet data." ) self.descriptorEdit = QPlainTextEdit("") self.descriptorEdit.setPlaceholderText( "Something like this:\n\nwsh(sortedmulti(2,[deadbeef/48h/1h/0h/2h]xpub.../0/*," ) + self.limit_label = QLabel("Limit of Addresses to Derive") + self.limit_label.setToolTip("Address derivation is slow.") + self.limit_box = QSpinBox() + self.limit_box.setValue(5) + self.limit_box.setRange(1, 10000) + + self.offset_label = QLabel("Offset of Addresses to Derive") + self.offset_label.setToolTip("Advanced users only.") + self.offset_box = QSpinBox() + self.offset_box.setValue(0) + self.offset_box.setMinimum(0) + self.descriptorSubmitButton = QPushButton("Derive Addresses") self.descriptorSubmitButton.clicked.connect(self.process_submit) @@ -132,6 +147,10 @@ def __init__(self): vbox.addWidget(self.descriptorLabel) vbox.addWidget(self.descriptorEdit) + vbox.addWidget(self.limit_label) + vbox.addWidget(self.limit_box) + vbox.addWidget(self.offset_label) + vbox.addWidget(self.offset_box) vbox.addWidget(self.descriptorSubmitButton) vbox.addWidget(self.addrResultsLabel) vbox.addWidget(self.addrResultsEdit) @@ -170,18 +189,16 @@ def process_submit(self): self.addrResultsLabel.setText(results_label) self.addrResultsEdit.setHidden(False) - # https://stackoverflow.com/questions/44014108/pass-a-variable-between-two-scripts - # TODO: make configurable - OFFSET = 0 - LIMIT = 5 + limit = self.limit_box.value() + offset = self.offset_box.value() # https://stackoverflow.com/questions/50104163/update-pyqt-gui-from-a-python-thread for index, address in get_addresses( pubkey_dicts=pubkeys_info["pubkey_dicts"], quorum_m=pubkeys_info["quorum_m"], quorum_n=pubkeys_info["quorum_n"], - limit=LIMIT, - offset=OFFSET, + limit=limit, + offset=offset, is_testnet=pubkeys_info["is_testnet"], ): result = f"#{index}: {address}" diff --git a/multiwallet_gui/send.py b/multiwallet_gui/send.py index f343608..637aee0 100644 --- a/multiwallet_gui/send.py +++ b/multiwallet_gui/send.py @@ -47,7 +47,7 @@ def __init__(self): "Partially Signed Bitcoin Transaction (required)" ) self.psbtLabel.setToolTip( - "Transaction that your online computer is asking you to sign, in base64 format." + "What your online computer is asking you to sign, in base64 format." ) self.psbtEdit = QPlainTextEdit("") self.psbtEdit.setPlaceholderText("Something like this:\n\ncHNidP8BAH0CAAAAA...") diff --git a/setup.py b/setup.py index 30dfb66..f99265f 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name="multiwallet", - version="0.3.3", + version="0.3.4", author="Michael Flaxman", author_email="multiwallet@michaelflaxman.com", description="Stateless multisig bitcoin wallet",