SomberNight
574243b897
hww ledger: call scan_devices fewer times
4 years ago
SomberNight
b5d3f1458a
hww: impl get_client in Hardware_KeyStore instead of subclasses
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
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
4 years ago
SomberNight
ec98ef5aee
hw ledger: sign_transaction: add progress indicator
...
related: https://github.com/spesmilo/electrum/issues/7516
4 years ago
nndiaye-ledger
7e083824b7
Add support for Ledger Nano S Plus ( #7692 )
4 years ago
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
4 years ago
Benoit Verret
f731c38293
Minor style changes
5 years ago
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
5 years ago
SomberNight
b56fe237cd
ledger: give clear error that old HW.1 cannot send to bech32 address
...
maybe related #7022
5 years ago
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
5 years ago
SomberNight
2eb02931ae
hw plugins: log exception at import time (but only if interesting)
...
related: https://github.com/spesmilo/electrum/issues/6928
5 years ago
SomberNight
b78cbcffd1
ledger: fix enumerating ledger devices with new bitcoin app (1.5.1)
...
see https://github.com/bitcoin-core/HWI/issues/402
5 years ago
SomberNight
200f547a07
ledger: fix compat with hw.1 - signing flow deadlocked
...
broke in 8a1b46d839ac24f77bfa5e3a1eed0cb7284b59eac5b685854c517f224c98dc44
5 years ago
SomberNight
eefb68c82b
transaction: change Transaction.is_segwit_input(txin) to txin.is_segwit()
5 years ago
SomberNight
e60aede77e
ledger: workaround to avoid on-device warning for unusual der path
...
related: #6512
5 years ago
ghost43
21c3572600
hardware devices: run all device communication on dedicated thread ( #6561 )
...
hidapi/libusb etc are not thread-safe.
related: #6554
5 years ago
SomberNight
a7199696d3
json_db: exempt keystore from StoredDict conversion
...
The keystore logic would need to be significantly changed to nicely
interoperate with StoredDict/json_db logic.
(just see KeyStore.__init__() and KeyStore.dump())
For now we exempt the keystore from the recursive StoredDict conversion, as
it is a smaller change that is also easier to review for correctness.
fixes #6066
fixes #6401
also reverts 2d3c2eeea9 (which was an even hackier workaround for #6066 )
5 years ago
SomberNight
b042c4118f
ledger: speed-up sign_transaction
...
really slow to scan usb devices for e.g. every tx input...
if user disconnects mid-signing, we would fail anyway.
6 years ago
SomberNight
48993118ad
ledger: bump min btchip-python version
...
and minor simplification
6 years ago
BTChip github
c1101ee258
Remove warning on Segwit inputs and newer Bitcoin application, use generic signing for P2SH inputs
6 years ago
SomberNight
2cfa3bd6c8
hww hidapi usage: try to mitigate some thread-safety issues
...
related: #6097
6 years ago
SomberNight
98d2ab5bd6
hww: fix HardwareClientBase not having reference to plugin
...
it was incorrectly documented that it did (previously only for some plugins)
6 years ago
SomberNight
e830ef309f
hww: factor out part of hid scan code to HW_PluginBase
...
so that bitbox02 can override it
6 years ago
SomberNight
4b1d835304
wizard hww: scan devices fewer times and move away from GUI thread
6 years ago
SomberNight
bf067f7558
HardwareClientBase: provide default implementation for label
...
and add warning about placeholders
6 years ago
SomberNight
db1ff4915f
hww: show model name in device enum lists (e.g. "Trezor T")
6 years ago
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
6 years ago
SomberNight
9d0bb295e6
hww: distinguish devices based on "soft device id" (not just labels)
...
fixes #5759
6 years ago
SomberNight
c798e5d9a1
qt: introduce PasswordLineEdit(QLineEdit)
6 years ago
SomberNight
371f55a0f9
hww: fix some threading issues in wizard
...
fixes #3377
related: #6064 (passphrase dialog not rendered correctly)
6 years ago
SomberNight
81fc3fcce2
hww: rm some code duplication: add "scan_and_create_client_for_device"
6 years ago
SomberNight
7f1c7955dc
DeviceMgr: clean-up locks a bit
6 years ago
SomberNight
2d3c2eeea9
keystore: add workaround for StoredDict issue #6066
...
note: not a proper fix... but works for now
6 years ago
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
6 years ago
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
6 years ago
SomberNight
33facd151d
ledger.sign_transaction: always do certain output checks
6 years ago
SomberNight
ee63e84bcf
ledger: faster sign_transaction startup
...
Only call Ledger_KeyStore.get_client_electrum() once,
as it runs DeviceMgr.scan_devices(), which is slow.
6 years ago
SomberNight
6b8c447eb9
ledger: support sending to OP_RETURN outputs
...
closes #5849
based on:
ca9b432ff0
7bb27eff84
6 years ago
SomberNight
f8c84fbb1e
hardware wallets: create base class for HW Clients. add some type hints
6 years ago
SomberNight
9e86352022
psbt: follow-ups: fix ledger
6 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
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
6 years ago
Christian Clauss
e34afd62ce
Travis CI: Use flake8 to find Python syntax errors and undefined names ( #5467 )
6 years ago
SomberNight
dfad0f43c0
ledger nano: fix monospace font on Windows, and text readability
6 years ago
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
6 years ago
SomberNight
f60f690ca9
change many str(e) to repr(e) as some exceptions were cryptic
...
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
7 years ago
SomberNight
f405c3fbdd
ledger: (trivial) rm some remnants of hw1 setup
7 years ago