Commit Graph

330 Commits

Author SHA1 Message Date
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
SomberNight 388811296e qt: replace some hardcoded pixel sizes for better high-dpi support 2022-08-10 20:23:56 +02:00
SomberNight 7b095158bf wallet: add get_label_for_address, and make get_label private
fixes https://github.com/spesmilo/electrum/issues/7919

In the past, when creating payment requests, we keyed them by on-chain address,
and set/saved the msg of the request as label for the address.
Many places in the code were calling wallet.get_label(addr) with the expectation that
relevant payment requests are found and their message/description (if any) is considered.

wallet.get_label(key) is now made private, and instead the explicit non-polymorphic
wallet.get_label_for_{address,rhash,txid} alternatives should be used.
2022-08-09 17:21:14 +02:00
ThomasV ad9030bd15 labels plugin: handle setting a label to None 2022-07-29 09:38:15 +02:00
SomberNight 79fec3417a crypto.py: rm {En,De}codeAES_base64. instead use {En,De}codeAES_bytes 2022-07-12 15:50:42 +02:00
Sander van Grieken 1260720bb6 qml: qml test plugin 2022-07-07 18:28:00 +02:00
Sander van Grieken d195fce82d qml: hook any qml supporting plugins, add test plugin
This allows different platforms to have their own UI components while still leveraging the common
set of QObjects and utility components.
2022-07-07 18:28:00 +02:00
SomberNight 5b29e6d4f5 qt: (refactor) split "receive tab" out from main_window.py 2022-07-01 16:03:28 +02:00
SomberNight 574243b897 hww ledger: call scan_devices fewer times 2022-06-03 17:14:51 +02:00
SomberNight b5d3f1458a hww: impl get_client in Hardware_KeyStore instead of subclasses 2022-06-03 17:14:44 +02:00
SomberNight 745e697188 hww: move trigger_pairings to DeviceMgr 2022-06-03 17:14:40 +02:00
ThomasV c67c4e95dc remove email plugin 2022-05-24 11:48:14 +02:00
Jeremy Rand 1aa444e0f8 Fix "== None" linter fails
Credit to Zoltan Konder for pointing me to this issue.
2022-05-24 02:39:11 +00:00
SomberNight cac4b6f92c email plugin: SSL was using insecure defaults 2022-05-23 19:04:51 +02:00
SomberNight 7e77a7e1cc email plugin: (trivial) adapt to Invoices refactor 2022-05-23 18:53:19 +02:00
SomberNight 98feff07ad threading.Thread: fix some DeprecationWarnings
"DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead"
2022-05-23 17:52:39 +02:00
Jamie C. Driver 15f108aaa5 Add support for the Blockstream Jade hww 2022-05-20 16:03:46 +01:00
SomberNight 7f876e46fb hw plugins: (follow-up) rm some more dead code
follow-up https://github.com/spesmilo/electrum/commit/30623c352907d80dab421cbfb3dabf9c3847ac57
2022-05-11 19:41:25 +02:00
SomberNight 6c50d3b0a3 hw plugins: (cleanup) rm no-op clear_client argument from keystore.give_error
The keystore does not have a "client" field.
One is supposed to use the "get_client" method instead (the generic API is `plugin.get_client(keystore)`)
Remnants of old code.
2022-05-11 19:30:14 +02:00
SomberNight aab8e664ed hw plugins: (cleanup) Plugin objects should not have a Client field
Clients are per-connected-device, plugins are ~singletons.
These were mostly remnants of old code.
2022-05-11 19:16:18 +02:00
SomberNight 30623c3529 hw plugins: (cleanup) Plugin objects should not have a Handler field
Handlers are per-client (connected device), plugins are ~singletons.
These were mostly remnants of old code.
2022-05-11 19:13:00 +02:00
SomberNight 9599254d43 hw: rm dead code from Hardware_KeyStore subclasses
- force_watching_only is long since unused
- comment was just duplicated from the base class
2022-05-09 20:09:10 +02:00
SomberNight d5f987c9e9 hw keepkey: workaround protobuf weirdness
this adds a hackish workaround for https://github.com/spesmilo/electrum/issues/7779
2022-05-04 20:41:49 +02:00
SomberNight 610dd7ce83 hardware wallets: redefine "id_" for hid devices to avoid collisions
I had a ledger nano S and a ledger nano S plus connected at the same time,
and the "id_"s were colliding resulting in weird behaviour. Multisig was pretty
much not usable with both devices connected simultaneously.

Example dicts returned by `hid.enumerate(0, 0)`:

{'path': b'\\\\?\\hid#vid_2c97&pid_1015&mi_00#a&2a30{REDACTED}&0&0000#{REDACTED_UUID}', 'vendor_id': 11415, 'product_id': 4117, 'serial_number': '0001', 'release_number': 513, 'manufacturer_string': 'Ledger', 'product_string': 'Nano S', 'usage_page': 65440, 'usage': 1, 'interface_number': 0},

{'path': b'\\\\?\\hid#vid_2c97&pid_5011&mi_00#a&28d{REDACTED}&0&0000#{REDACTED_UUID}', 'vendor_id': 11415, 'product_id': 20497, 'serial_number': '0001', 'release_number': 513, 'manufacturer_string': 'Ledger', 'product_string': 'Nano S Plus', 'usage_page': 65440, 'usage': 1, 'interface_number': 0}
2022-04-28 21:38:05 +02:00
SomberNight ec98ef5aee hw ledger: sign_transaction: add progress indicator
related: https://github.com/spesmilo/electrum/issues/7516
2022-03-26 15:26:13 +01:00
ghost43 8acda5f48d Merge pull request #7693 from benma/bb02
bitbox02: bump dependency to v6.0.0, support sending to taproot
2022-03-02 13:29:24 +00:00
Marko Bencun 01b4b35f9f bitbox02: bump dependency to v6.0.0, support sending to taproot 2022-03-02 14:14:24 +01:00
nndiaye-ledger 7e083824b7 Add support for Ledger Nano S Plus (#7692) 2022-03-02 12:59:51 +00:00
SomberNight 376fc01b27 keystore.sign_message: add optional script_type argument
this is used by trezor
(and also by bitbox02, which was using a workaround previously)

fixes https://github.com/spesmilo/electrum/issues/7670
2022-02-22 19:20:03 +01:00
SomberNight 5cdb4471ec signmessage: also accept Trezor-type sigs for p2wpkh and p2wpkh-p2sh addrs
The signatures we create are unchanged but we now also accept signatures created by Trezor and others.

see https://github.com/spesmilo/electrum/issues/3861
2022-02-16 19:25:46 +01:00
SomberNight 4f9e4c520f ecc: API changes: verify_message_hash to return bool instead of raising
verify_message_hash and verify_message_for_address now return bool
instead of raising Exceptions on bad signatures.
2022-02-16 19:24:38 +01:00
Pavol Rusnak 1e8e2890d5 trezor: use the same amount unit (satoshi, etc.) on device 2021-12-13 14:30:27 +01:00
matejcik 9a975a5200 trezorlib 0.13 compatibility 2021-12-09 13:55:03 +01:00
ghost43 b828627dc6 Merge pull request #6917 from andrewkozlik/slip39
SLIP-0039 wallet recovery
2021-06-22 19:44:02 +02:00
tiagotrs f9734f5611 rephrasing, removal of revealer website links (#7359)
* rephrasing, removal of website links

* don't open pdf automatically
2021-06-21 17:26:52 +00:00
Andrew Kozlik 0dce13a1dd Implement SLIP-0039 wallet recovery. 2021-04-30 19:55:47 +02:00
ThomasV 2c39f0c9c4 fix #7190 2021-04-08 15:12:32 +02:00
ThomasV 774a9ad263 fix #7164 2021-04-01 14:42:52 +02:00
SomberNight 1e3373bd2f cosigner_pool: fix #7134 2021-03-27 01:44:18 +01:00
Benoit Verret f731c38293 Minor style changes 2021-03-21 00:36:23 -04:00
Marko Bencun a16fdd54a8 bitbox02: bump dependency to 5.2.0 2021-03-18 09:45:15 +01:00
SomberNight 3ea27beb4e daemon: change stop() to use events, instead of polling 2021-03-17 19:42:20 +01:00
SomberNight 83750a861f ledger: bump min btchip-python (0.1.30->0.1.32)
So that it has https://github.com/LedgerHQ/btchip-python/pull/42

fixes #6928
2021-02-12 05:28:01 +01:00
SomberNight b56fe237cd ledger: give clear error that old HW.1 cannot send to bech32 address
maybe related #7022
2021-02-12 04:47:53 +01:00
Gordan Nekić 9c4807644b Fix ledger sign message (#7004)
there was an around ~1/128 chance of creating an invalid signature when signing a message with a ledger
2021-02-06 05:16:52 +00:00
ThomasV 641968fcf8 Wizard: do not ask seed type, default to segwit
segwit addresses are widely supported today.
2021-01-12 11:03:21 +01:00
SomberNight 2eb02931ae hw plugins: log exception at import time (but only if interesting)
related: https://github.com/spesmilo/electrum/issues/6928
2021-01-11 00:05:23 +01:00
Peter D. Gray e829f2a0bc plugins/coldcard/coldcard.py: include derivation path for each part of multisig (for v3.2.1 of firmware) 2021-01-08 13:16:54 -05:00
Peter D. Gray a810bc50be plugins/coldcard/README.md: updates and cleanup 2021-01-08 13:16:13 -05:00
SomberNight b28b3994c7 qt: move window.get{Open,Save}FileName to util
Sometimes we want its "remember path" behaviour but it does not make sense to
parent the dialog from main window. When so, caller code no longer needs to
get a reference to a main window.

Also rm last usages of get_parent_main_window().
2020-12-20 15:25:35 +01:00