Commit graph

32 commits

Author SHA1 Message Date
SomberNight
4b1d835304
wizard hww: scan devices fewer times and move away from GUI thread 2020-04-09 19:45:31 +02:00
SomberNight
bf067f7558
HardwareClientBase: provide default implementation for label
and add warning about placeholders
2020-04-08 18:28:21 +02:00
SomberNight
db1ff4915f
hww: show model name in device enum lists (e.g. "Trezor T") 2020-04-08 17:53:40 +02:00
SomberNight
4ef313a1ac
hww: smarter auto-selection of which device to pair with
scenario1:
- 2of2 multisig wallet with trezor1 and trezor2 keystores
- only trezor2 connected
- previously we would pair first keystore with connected device and then display error.
  now we will pair the device with the correct keystore on the first try

scenario2:
- standard wallet with trezor1 keystore
- trezor2 connected (different device)
- previously we would pair trezor2 with the keystore and then display error.
  now we will prompt the user to select which device to pair with (out of one)

related: #5789
2020-04-08 17:53:33 +02:00
SomberNight
9d0bb295e6
hww: distinguish devices based on "soft device id" (not just labels)
fixes #5759
2020-04-08 14:44:42 +02:00
SomberNight
371f55a0f9
hww: fix some threading issues in wizard
fixes #3377
related: #6064  (passphrase dialog not rendered correctly)
2020-04-01 21:09:17 +02:00
SomberNight
81fc3fcce2
hww: rm some code duplication: add "scan_and_create_client_for_device" 2020-04-01 21:09:14 +02:00
SomberNight
7f1c7955dc
DeviceMgr: clean-up locks a bit 2020-04-01 21:09:00 +02:00
SomberNight
2d3c2eeea9
keystore: add workaround for StoredDict issue #6066
note: not a proper fix... but works for now
2020-04-01 13:33:38 +02:00
SomberNight
9c5e49f432
ecc.ECPubkey: also accept bytearray in __init__
regression since #5947

Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 339, in on_device
    self.plugin.setup_device(device_info, self, purpose)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 598, in setup_device
    client.get_xpub("m/44'/0'", 'standard') # TODO replace by direct derivation once Nano S > 1.1
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 55, in catch_exception
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 124, in get_xpub
    eckey=ecc.ECPubkey(publicKey),
  File "...\electrum\electrum\ecc.py", line 145, in __init__
    self._x, self._y = _x_and_y_from_pubkey_bytes(b)
  File "...\electrum\electrum\ecc.py", line 119, in _x_and_y_from_pubkey_bytes
    ret = _libsecp256k1.secp256k1_ec_pubkey_parse(
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type
2020-02-19 00:40:33 +01:00
SomberNight
d2f132738a
wallet: only select mature coins by default
this is a regression from #5721

Removed the `TxInput.is_coinbase` method as I think it is a confusing API,
instead we now have `TxInput.is_coinbase_input` and `TxInput.is_coinbase_output`.

related #5872
2020-01-02 00:43:49 +01:00
SomberNight
33facd151d
ledger.sign_transaction: always do certain output checks 2019-12-17 21:33:07 +01:00
SomberNight
ee63e84bcf
ledger: faster sign_transaction startup
Only call Ledger_KeyStore.get_client_electrum() once,
as it runs DeviceMgr.scan_devices(), which is slow.
2019-12-17 21:19:57 +01:00
SomberNight
6b8c447eb9
ledger: support sending to OP_RETURN outputs
closes #5849

based on:
ca9b432ff0
7bb27eff84
2019-12-17 21:10:14 +01:00
SomberNight
f8c84fbb1e
hardware wallets: create base class for HW Clients. add some type hints 2019-11-11 17:04:12 +01:00
SomberNight
9e86352022
psbt: follow-ups: fix ledger 2019-11-05 21:34:54 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
as it seems every consumer wants to know this and has its own hacks to
figure it out
2019-09-03 14:34:10 +02:00
SomberNight
be4cf321e0
ledger: remove mobile pairing 2FA support for Ledger Nano
service no longer provided by Ledger; app not in Google Play Store any more

based on Electron-Cash/Electron-Cash#1298
2019-08-09 19:54:09 +02:00
SomberNight
3385a94753
logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
d4a2e9634f
bitcoin: disallow importing/sweeping segwit scripts with uncompressed pubkey
fixes #4638
2019-04-19 00:37:28 +02:00
SomberNight
b2128af958
ledger: suppress error message if user cancels tx signing 2019-02-28 17:56:08 +01:00
SomberNight
85a7aa291e
bip32: refactor whole module. clean-up. 2019-02-22 18:50:24 +01:00
Jean P
7618693ca9 Add support for Ledger Nano X and future devices (#5140) 2019-02-20 13:46:26 +01:00
Tom Kneiphof
8fd84f77c7 Fix ledger transaction version (#4991) 2019-01-07 10:49:10 +01:00
SomberNight
bd32b88f62
introduce UserFacingException
we should not raise generic Exception when wanting to communicate with
the user. it makes distinguishing programming errors and messages hard,
as the caller will necessarily need to catch all Exceptions then
2018-11-08 19:46:15 +01:00
SomberNight
a88a2dea82
split bip32 from bitcoin.py 2018-10-25 22:20:33 +02:00
SomberNight
788b5b04fe
ledger: always use finalizeInput in sign_transaction
related #4749
2018-10-02 15:52:24 +02:00
SomberNight
5f3408dd70
transaction.py: introduce TxOutputHwInfo namedtuple 2018-08-14 19:15:15 +02:00
SomberNight
2eb72d496f
transaction: introduce TxOutput namedtuple 2018-08-01 19:10:08 +02:00
Janus
1fb0b6d7bd plugins/ledger: just hardcode BTCHIP_DEBUG to False 2018-07-19 13:33:57 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00
Renamed from plugins/ledger/ledger.py (Browse further)