Commit graph

61 commits

Author SHA1 Message Date
matejcik
8e681c1723 trezor: update name (TREZOR -> Trezor) 2018-12-05 15:44:24 +01:00
matejcik
43acd09df8 trezor: support outdated firmware notifications
Outdated firmware error messages were originally raised from
create_client, which would mean that a client for an outdated device
would not be created.

This had a number of undesirable outcomes due to "client does not exist"
being conflated with "no device is connected".

Instead, we raise in setup_client (which prevents creating new wallets
with outdated devices, BUT shows them in device list), and python-trezor
also raises on most calls (which gives us an error message when opening
wallet and/or trying to do basically anything with it).

This is still suboptimal - i.e., there's currently no way for Electrum to
claim higher version requirement than the underlying python-trezor, and
so minimum_firmware property is pretty much useless ATM.
2018-12-05 14:26:19 +01:00
matejcik
8571cafcc8 trezor: call get_xpub with correct argument
`creating` indicates that this is a new wallet. Which is always the case
in `setup_device`
2018-12-05 14:24:32 +01:00
matejcik
8973bb6f71 Merge branch 'master' into trezor-0.11 2018-12-03 17:00:22 +01:00
Janus
ec5f406f49 plugins: labels: dump response if malformed sync server response 2018-11-30 19:16:07 +01:00
ThomasV
2484c52611
Merge pull request #4838 from SomberNight/keystore_pw_hash2b
keystore: stronger pbkdf for encryption
2018-11-30 11:48:03 +01:00
SomberNight
ee287740a7
coldcard: fix p2pkh signing for new fw (1.1.0)
PSBT was serialised incorrectly but old fw did not complain
2018-11-29 20:28:27 +01:00
SomberNight
d0e6b8c89d
hw: fix passphrase dialog with confirmation
closes #4876
2018-11-28 20:54:57 +01:00
matejcik
c33c907330 trezor: update to trezor 0.11.0 2018-11-27 15:34:19 +01:00
matejcik
5411ad9633 plugins can also check maximum library version 2018-11-27 15:32:33 +01:00
SomberNight
32af83b7ae
wizard/hw: show transport type when listing HWDs 2018-11-16 19:03:25 +01:00
SomberNight
48b0de7871
keystore: stronger pbkdf for encryption 2018-11-10 16:36:41 +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
dace2e5495
trezor: don't let bridge transport failing block all other transports
[trezor] connecting to device at bridge:hid...
[trezor] connected to device at bridge:hid...
Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 255, in choose_hw_device
    u = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices)
  File "...\electrum\electrum\plugin.py", line 501, in unpaired_device_infos
    client = self.create_client(device, handler, plugin)
  File "...\electrum\electrum\plugin.py", line 374, in create_client
    client = plugin.create_client(device, handler)
  File "...\electrum\electrum\plugins\trezor\trezor.py", line 124, in create_client
    client = self.client_class(transport, handler, self)
  File "...\electrum\electrum\plugins\trezor\client.py", line 7, in __init__
    ProtocolMixin.__init__(self, transport=transport)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 444, in __init__
    self.init_device()
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 454, in init_device
    self.features = expect(proto.Features)(self.call)(init_msg)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 115, in wrapped_f
    ret = f(*args, **kwargs)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 129, in wrapped_f
    client.transport.session_begin()
  File "...\Python36-32\lib\site-packages\trezorlib\transport\__init__.py", line 42, in session_begin
    self.open()
  File "...\Python36-32\lib\site-packages\trezorlib\transport\bridge.py", line 69, in open
    raise TransportException('trezord: Could not acquire session' + get_error(r))
trezorlib.transport.TransportException: trezord: Could not acquire session (error=400 str=wrong previous session)
[DeviceMgr] error getting device infos for trezor: trezord: Could not acquire session (error=400 str=wrong previous session)
2018-11-08 17:07:05 +01:00
SomberNight
5d52dc204c
coldcard: fix spending when there is no change
follow-up 9037f25da1
2018-11-06 16:17:18 +01:00
SomberNight
9037f25da1
kill old-style namedtuples 2018-10-28 00:28:29 +02:00
SomberNight
082a83dd85
rename crypto.Hash to sha256d 2018-10-25 22:28:24 +02:00
SomberNight
a88a2dea82
split bip32 from bitcoin.py 2018-10-25 22:20:33 +02:00
SomberNight
bf18e2bbc9
follow-up prev 2018-10-19 22:24:42 +02:00
Peter D. Gray
14b4955a6f
Fix p2wpkh-p2sh support per issue #4729 2018-10-18 12:38:47 -04:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight
788b5b04fe
ledger: always use finalizeInput in sign_transaction
related #4749
2018-10-02 15:52:24 +02:00
SomberNight
4d43d12abf
transaction: don't convert p2pk to p2pkh address when displaying
also closes #4742
2018-10-01 04:58:26 +02:00
SomberNight
ab1ec57429
trezor and clones: rm dead code
see Electron-Cash/Electron-Cash#872
see Electron-Cash/Electron-Cash#874
2018-09-30 02:10:17 +02:00
SomberNight
8aebb8249a
keepkey: full segwit support
ported from trezor plugin
needs new fw to work (5.8??)

fixes #3462
2018-09-30 01:29:27 +02:00
SomberNight
70c32590a9
hw plugins: fix only_hook_if_libraries_available
follow-up f9a5f2e183
2018-09-30 00:25:36 +02:00
SomberNight
c4f3fbaca0
labels: fix potential threading issues
also handle --offline
2018-09-25 21:23:44 +02:00
SomberNight
f9a5f2e183
fix #4698 2018-09-19 20:02:03 +02:00
SomberNight
8caab35d90
trezor: re-enable bridge transport
It was disabled in 680df7d6b6 due to #4421,
but that has since been fixed.
Also related is #4060; and now that that is closed, the bridge transport
is not proxied anyway.
2018-09-19 18:14:55 +02:00
SomberNight
6f0dceb152
fix #4726
follow-up 88fc62e8f7
2018-09-19 15:26:03 +02:00
SomberNight
9ffd2de492
Merge branch 'aiorpcx' 2018-09-11 20:52:58 +02:00
SomberNight
4a88ca1a3a
fix --offline option for fx and trustedcoin 2018-09-08 17:56:29 +02:00
Janus
52b877ac3d network: add singleton accessor classmethod, port trustedcoin to aiohttp 2018-09-07 11:35:16 +02:00
Janus
617103bb2a labels: fix saving single label 2018-09-06 18:30:24 +02:00
Johann Bauer
e5cd2ed52f
Goldcard: Change spelling mistake 2018-09-06 18:15:44 +02:00
ThomasV
8fe066707a rm import 2018-09-06 17:47:10 +02:00
Janus
6e80ba7b4f asyncio: labels, crash_reporter, fx: migrate requests use to aiohttp 2018-09-06 16:18:45 +02:00
SomberNight
91c369e392
hw wallets: generalise 'minimum_library' for those that provide a version number 2018-08-23 18:31:14 +02:00
ghost43
9279f30363
Merge pull request #4470 from Coldcard/ckcc
Support for new hardware wallet: Coldcard
2018-08-23 16:51:52 +02:00
tiagotrs
2a5f108d4a change prng, add warning against encrypting multiple secrets (#4649)
* substitute python prng generator with hmac_drbg

* add warning, change version

* brick cards version 0

* separate python-drbg module, include tests and license

* import to match PEP 8

* fix line break, minor changes in wording

* fixes noise_seed formatting errors

* fix import, include license exclude tests drbg module
2018-08-22 22:25:12 +02:00
SomberNight
04c1b522d6
minor fixes for prev
use TxOutputHwInfo namedtuple

warn user if device is set to wrong chain

undo parts of prev re testnet. fix p2wpkh.

testnet support. and minor stuff
2018-08-22 21:52:28 +02:00
Peter D. Gray
0bcea80bdf
Support for new hardware wallet: Coldcard
build-wine/deterministic.spec: add Coldcard plugin and ckcc-protocol dependancy

Require version 0.7.2 of ckcc-protocol (window fixes)

Rework import paths to new standards

Updated icons

New minimum version, for latest PSBT constants

Upgrade to final PSBT (BIP 174) standard encoding

Remove log noise

Show bootloader version number as well

Handle case where libraries are missing better

Remove noise about missing packages, for rest of world

Add reference to ckcc-protocol module/data

Remove dead code

Beef up the README more

Slightly better looking

Add version numbers and upgrade firmware feature

Split out DFU support into own file

First pass at adding Coinkite Coldcard hardware wallet to Electrum
2018-08-22 21:43:03 +02:00
SomberNight
88fc62e8f7
fix #4626 2018-08-14 19:38:19 +02:00
SomberNight
5f3408dd70
transaction.py: introduce TxOutputHwInfo namedtuple 2018-08-14 19:15:15 +02:00
SomberNight
b4b1de088a
move TrezorClient.expand_path to bitcoin.py
and allow its input to end with a '/' slash
2018-08-14 18:19:16 +02:00
SomberNight
52a4810752
trezor: add "show address" option in addresses tab context menu for all trezors
in case of a multisig wallet, with multiple trezors, previously only one of the trezors could be used
2018-08-14 15:02:31 +02:00
SomberNight
820316e745
safe_t: disable udp transport as it was interfering with trezor emulator 2018-08-14 13:33:32 +02:00
tiagotrs
576c2718c8 Merge branch 'master' of https://github.com/spesmilo/electrum 2018-08-07 16:38:06 +02:00
tiagotrs
91bcc5f560 fix problems with hidpi monitors issue #4576, ensure PNGS are precise the same size. 2018-08-07 16:33:58 +02:00
SomberNight
a7cfa56621
cosigner pool: don't block gui 2018-08-03 20:53:56 +02:00