Commit Graph

379 Commits

Author SHA1 Message Date
Sander van Grieken
0bb41a32c8 qml: fix layout issues in ShowConfirmOTP. fixes #8249 2023-03-17 00:23:50 +01:00
ThomasV
f770905551 follow-up d56162c588 2023-03-14 17:28:33 +01:00
SomberNight
7746cc8e60 bip32: (trivial) rename method strpath_to_intpath, for symmetry
Required a much higher mental load to parse the name "convert_bip32_path_to_list_of_uint32"
than to parse "convert_bip32_strpath_to_intpath".
And we already have the ~inverse: "convert_bip32_intpath_to_strpath".
2023-03-10 14:23:17 +00:00
SomberNight
e457bb50e9 trezor: TrezorPlugin._make_multisig to use MultisigDescriptor
This fixes a regression where the plugin was assuming ordering for
txin.pubkeys (which is now a set).
(previously txin.pubkeys was a list ordered according to the final
sort order of keys inside the bitcoin script)
2023-03-03 16:40:41 +00:00
SomberNight
0647a2cf9f transaction.py: rm PartialTxInput.{num_sig, script_type} 2023-03-03 16:40:12 +00:00
SomberNight
2242a506a9 ledger: fix sign_transaction for Ypub / sh(wsh(multi())) wallets
regression from https://github.com/spesmilo/electrum/pull/8041
2023-02-22 14:02:24 +00:00
ThomasV
4e9ddf6ddd cosignerpool: minor fix, follow-up new GUI flow 2023-02-21 13:15:06 +01:00
SomberNight
373db76ac9 util: kill bh2u
no longer useful, and the name is so confusing...
2023-02-17 11:43:11 +00:00
SomberNight
1ce37c8bb1 transaction: rm hardcoded sighash magic numbers 2023-02-17 11:40:12 +00:00
SomberNight
b20933de6d payserver: better handle running with --offline
```
 19.70 | E | plugin | Plugin error. plugin: payserver, hook: wallet_export_request
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/plugin.py", line 227, in run_hook
    r = f(*args)
  File "/home/user/wspace/electrum/electrum/plugins/payserver/payserver.py", line 69, in wallet_export_request
    d['view_url'] = self.view_url(key)
  File "/home/user/wspace/electrum/electrum/plugins/payserver/payserver.py", line 55, in view_url
    return self.server.base_url + self.server.root + '/pay?id=' + key
AttributeError: 'NoneType' object has no attribute 'base_url'
```
```
 23.22 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/plugins/payserver/qt.py", line 48, in settings_dialog
    url = self.server.base_url + self.server.root + '/create_invoice.html'
AttributeError: 'NoneType' object has no attribute 'base_url'
```
2023-02-08 01:51:43 +00:00
ThomasV
dec397af95 update payserver submodule 2023-01-26 15:52:01 +01:00
ThomasV
396fa4a97a payserver: add 'view in payserver' menu item 2023-01-18 11:28:37 +01:00
ThomasV
d13c74eb0d payserver plugin improvements 2023-01-17 12:26:03 +01:00
ThomasV
f680607683 update payserver submodule 2023-01-17 07:35:52 +01:00
ThomasV
9f8b91da50 update payserver submodule 2023-01-16 13:57:08 +01:00
ThomasV
2c0dd0deb0 update payserver www submodule 2023-01-15 10:43:45 +01:00
SomberNight
d5c3c7ca66 payserver: daemon._run should only be called once 2023-01-13 01:02:47 +00:00
SomberNight
9039ec1dc4 payserver: make daemon_wallet_loaded hook reliable
daemon.load_wallet() often early-returns,
e.g. in Qt case, for storage-encrypted wallets.

closes https://github.com/spesmilo/electrum/issues/8118
2023-01-13 00:58:02 +00:00
SomberNight
cea4238b81 hw DeviceMgr: mostly switch away from xpubs for device pairing
- the DeviceMgr no longer uses xpubs to keep track of paired hw devices
- instead, introduce keystore.pairing_code(), based on soft_device_id
- xpubs are now only used in a single place when the actual pairing happens
- motivation is to allow pairing a single device with multiple generic
  output script descriptors, not just a single account-level xpub
- as a side-effect, we now allow pairing a device with multiple open
  windows simultaneously (if keystores have the same root fingerprint
  -- was already the case before if keystores had the same xpub)
2022-12-19 08:19:19 +00:00
SomberNight
8878059b2f hw bitbox02: show error if trying to sign_message on testnet
User was getting confusing traceback.
Original discussion shows the device only supports messages for mainnet.

see https://github.com/spesmilo/electrum/pull/6649#issuecomment-708634831
2022-12-19 07:49:40 +00:00
Sander van Grieken
5246f3d510 qml: refactor is_last checks to mostly lambdas, add multisig flow for 1st cosigner keystore,
add initial flow and view placeholders for additional cosigners.
2022-11-14 12:19:56 +01:00
ghost43
ac239a81b8 Merge pull request #8041 from bigspider/app-bitcoin-new
Modify Ledger plugin to support the new bitcoin app v2.1.0
2022-11-10 14:24:14 +00:00
SomberNight
e75110ec04 hw_wallet: de-dupe "message_dialog" code, make text selectable 2022-11-09 21:10:52 +00:00
SomberNight
9b82eb6d06 ledger: re-add support for HW.1, and add a deprecation warning 2022-11-09 20:42:55 +00:00
SomberNight
3cac7e9a61 ledger: minor clean-up 2022-11-09 20:11:08 +00:00
SomberNight
e4a880e435 trezor: use lower device-enumeration timeout for udp transport
This transport IIUC is only used for the trezor emulator.
The default timeout is 10 seconds. Every time we enumerate hw devices,
we also enumerate trezor devices, including scanning for the udp transport.
For some reason, recently on Windows, sporadically, this scan keeps
hitting the timeout for me. Quite annoying, as I might not even be testing
trezor (and I am certainly not testing using the trezor emulator on Windows...),
but scanning to test other plugins.

Probably overkill to have a 10 sec timeout for contacting localhost anyway.
2022-11-09 17:46:18 +00:00
Salvatore Ingala
e47270daa5 Fix multiple signing 2022-11-09 13:21:14 +01:00
Salvatore Ingala
3c0e3eb7e2 Refactored LedgerPlugin::create_client, and handle errors when creating the client. 2022-11-09 11:34:41 +01:00
Salvatore Ingala
7c80779903 Replace print() with logger 2022-11-09 11:21:21 +01:00
Salvatore Ingala
80e214d465 - Remove code calling hw1-related features, not supported in the version of btchip embedded in ledger_bitcoin
- Fix signature of sign_message in Ledger_Client_Legacy
2022-11-09 10:59:12 +01:00
Salvatore Ingala
f3eb492dca Update Ledger website to ledger.com in error message 2022-11-08 17:44:09 +01:00
Salvatore Ingala
c401f84aa7 Avoid relying on old btchip package; improve missing library error handling 2022-11-08 17:44:06 +01:00
Salvatore Ingala
2d64dc13c9 Modify Ledger plugin to support the new bitcoin app v2.1.0 2022-11-08 17:44:05 +01:00
Pavol Rusnak
b4e5f35e66 trezor: optimize signing speed by not serializing transaction in trezor
Since Electrum is not using TxRequestSerializedType.serialized_tx
we might ask the device not to serialize transactions
by setting SignTx.serialize=False

This flag is only present in trezorlib 0.13.4, so only users on that
version will benefit from the speedup.

However, we decided to keep the minimum required version to 0.13.0,
since the newer version is not strictly required.
2022-11-07 16:48:43 +01:00
SomberNight
da3b271f5c cosigner_pool plugin: handle multiple multisig wallets open
fixes https://github.com/spesmilo/electrum/issues/3080
2022-11-06 04:36:56 +00:00
Sander van Grieken
0c9d4abb82 qml: show 2FA status and billing info in WalletDetails, expose billing schedule setting in config 2022-11-04 13:35:15 +01:00
SomberNight
01b5e3f8e0 flake8: enable more mandatory tests 2022-10-31 16:13:22 +00:00
ThomasV
3bb453aaba PayServer: add settings dialog and hook for view_url 2022-10-28 13:52:24 +02:00
ThomasV
724edd223c make PayServer a plugin 2022-10-28 12:07:30 +02:00
Sander van Grieken
28b5103d93 remove qml_test plugin, remove plugin settings test 2022-10-21 13:32:16 +02:00
Sander van Grieken
c6496d02ef add recovery paths (disable and confirm/reset OTP) for 2FA 2022-10-21 13:32:16 +02:00
Sander van Grieken
255f508574 remove unused, add type checking imports 2022-10-21 13:32:16 +02:00
Sander van Grieken
20c95b26ea wip otp on pay 2022-10-21 13:32:13 +02:00
Sander van Grieken
43bac2edff qml: use new wizard approach in qml and also implement 2FA/trustedcoin 2022-10-21 13:31:24 +02:00
SomberNight
4b8790c919 qt 2fa: show different status-bar icon for "2fa disabled" wallet
related: https://github.com/spesmilo/electrum/issues/8018
2022-10-16 15:10:46 +00:00
Jamie C. Driver
68f320041a jade: update Jade api to 0.1.37 2022-09-15 11:54:42 +01:00
Sander van Grieken
6bbd18dc78 qml: fix flake errors 2022-09-09 19:58:48 +02:00
Sander van Grieken
27999a9583 qml: clean up, generalize plugin gui base, enumerate plugins in gui
(still quite crude impl, dynamic enable/disable plugin gui is misaligned
with backend)
2022-09-08 15:15:46 +02:00
Sander van Grieken
32a81d8ee7 qml: initial plugin support, with labelsync mostly implemented 2022-09-08 12:19:38 +02:00
SomberNight
16c84acb98 hw wallets: improve error message when a dependency is missing
e.g.
```
Debug message
  jade: (error getting device infos)
    Missing libraries for jade.
        ModuleNotFoundError("No module named 'cbor'")
    Make sure you install it with python3
```
2022-08-15 10:38:56 +00:00