Commit graph

80 commits

Author SHA1 Message Date
Neil Booth
828320c1af trezor: provide a default interface number. 2016-02-06 14:37:38 +09:00
Neil Booth
e61fffab55 Trezor/KeepKey: force watching only improvements
Only warn about watching only once given a chance to pair.
Failure to pair makes watching-only and warns.
In error message to user, distinguish between failure to connect
and failure to pair.
2016-01-31 19:36:21 +09:00
Neil Booth
412e2a8d2c Create is_pairable() function and use it.
Fixes #1653.
2016-01-29 19:26:05 +09:00
Neil Booth
bf942b5259 Trezor: another place needs client handler set 2016-01-27 21:27:51 +09:00
Neil Booth
268dcbcac5 Trezor: multi-device window parenting fix 2016-01-24 23:18:41 +09:00
Neil Booth
93e0c72ce2 Plugins: start thread at end of constructor
Don't add jobs twice
2016-01-24 19:59:58 +09:00
Neil Booth
80e15577b5 Update comment 2016-01-24 19:45:13 +09:00
Neil Booth
dee402b961 Plugin wallets: better error when unloadable
Used to get:

jsonrpclib.jsonrpc.ProtocolError: (-32603, u'Server error:   File "src/electrum/lib/plugins.py", line 144, in wallet_plugin_loader | KeyError: \'trustedcoin\'')

Now get:

jsonrpclib.jsonrpc.ProtocolError: (-32603, u'Server error:   File "src/electrum/lib/plugins.py", line 81, in load_plugin | RuntimeError: cmdline implementation for trustedcoin plugin not found')
2016-01-24 19:39:59 +09:00
Neil Booth
f4fa53e915 Trezor: fixes for latest libtrezor
We were relying on internals of libtrezor that they just
changed.  However their changes don't work on Mac either.
Work around both issues.  I think this...

Fixes #1637
2016-01-24 14:33:21 +09:00
Neil Booth
f8ed7b058d Improved multi-device handling
Ask user which device to use when there are many.  If there
is only one skip the question.  We used to just pick the
first one we found; user had no way to switch.

We have to handle querying from the non-GUI thread.
2016-01-24 13:41:03 +09:00
Neil Booth
0d14781463 Trezor: GUI fixes
Trezor window was doing GUI stuff outside the GUI thread
2016-01-21 23:33:15 +09:00
Neil Booth
24037be99c Clean up client caching and handling 2016-01-21 22:56:53 +09:00
ThomasV
858b9c5655 kivy: improve settings dialog 2016-01-21 12:12:55 +01:00
ThomasV
4122c108fc plugins: enable & disable methods 2016-01-19 10:03:05 +01:00
Neil Booth
1ec3ad59cc Ledger: get new wallet creation working again
This is enough to get new wallet creation working in the
absence of errors.
2016-01-11 14:23:35 +09:00
Neil Booth
2f1d6b2379 Have Trezor dialog work even if wallet unpaired
Required cleanup of handler logic.  Now every client
is constructed with a handler, so there is never a
question of not having one.
2016-01-09 17:15:31 +09:00
Neil Booth
6fb7dbd30d Implement passphrase protection toggling.
Along with chicken box.
2016-01-06 23:08:02 +09:00
Neil Booth
3d9f321cae Use a shared device manager
Use a shared device manager across USB devices (not yet taken
advantage of by ledger).  This reduces USB scans and abstracts
device management cleanly.

We no longer scan at regular intervals in a background thread.
2016-01-06 07:56:58 +09:00
Neil Booth
21bf5a8a84 Better support for USB devices
Benefits of this rewrite include:

- support of disconnecting / reconnecting a device without having
  to close the wallet, even in a different USB socket
- support of multiple keepkey / trezor devices, both during wallet
  creation and general use
- wallet is watching-only dynamically according to whether the
  associated device is currently plugged in or not
2016-01-02 20:39:29 +09:00
Neil Booth
1d07960290 Remove constructor method of plugins
Clean up wallet class loading.
2016-01-02 00:16:15 +09:00
Neil Booth
c7bd1e9428 Fix plugin dialog logic I broke recently 2016-01-01 19:22:34 +09:00
Neil Booth
d63e754c67 Remove some unused hook infrastructure 2016-01-01 19:15:01 +09:00
Neil Booth
11d135b32d Better install wizard
Break out the workflow logic of the install wizard
into a base class.  This means reimplementing with
full support in a new GUI is now easy; you just provide
ways to request passwords, show messages etc.  The API
is fully documented in the base class.

There are a couple of minor outstanding issues, including that
the old messages shown when recovering a wallet are missing.
I will come back to that.  Ledger wallet might be broken.

Other improvements:

The install wizard code is now easy to follow and understand.
Hardware wallets can now be restored without any need for their
accompanying libraries.
Various bits of trustedcoin were broken and have been fixed.
Many plugin hooks can be removed.  I have only started on this.
2016-01-01 16:48:18 +09:00
Neil Booth
1d51335827 Remove need for self.wallet for h/w wallets 2015-12-30 17:03:26 +09:00
Neil Booth
ed3c0a5469 Remove a name-clashing unnecessary local variable 2015-12-29 23:08:10 +09:00
ThomasV
b7cef8dd58 follow up to 74a9e2296c 2015-12-10 09:52:00 +01:00
ThomasV
de964f4033 plugins: on_close method 2015-12-09 09:41:24 +01:00
ThomasV
74a9e2296c separate Network and Plugins 2015-12-03 11:18:10 +01:00
ThomasV
deefd74c37 labels sync for kivy 2015-12-01 17:29:24 +01:00
ThomasV
ba2c737a21 finish separation between plugins and GUIs 2015-11-24 09:36:42 +01:00
ThomasV
2c0489c809 plugins: separate GUIs using child classes 2015-11-23 14:15:25 +01:00
ThomasV
175fdbcac6 Disentangle plugins and window management; use Qt signals 2015-11-23 09:05:34 +01:00
Neil Booth
3211d752c7 Need to set p.wallet unfortunately
Fixes #1553
2015-11-19 08:31:01 +09:00
Neil Booth
e9384f15ed Plugins manage their own wallet tracking 2015-11-14 15:58:10 +09:00
Neil Booth
93b99ebded Handy new class PrintError
Saves adding "def print_error" to endless classes.
2015-09-06 21:40:00 +09:00
Neil Booth
f9047c6df0 Fix for dynamic loading and unloading of plugins
Need to add and remove thread jobs
2015-09-06 19:35:14 +09:00
Neil Booth
b5f986ee56 Torwards sane signalling for exchange_rate plugin 2015-09-05 21:47:35 +09:00
Neil Booth
1171a25815 Genericize plugin handling of thread jobs
Move it to the Plugins class so all plugins get it for
free.
2015-09-05 17:21:28 +09:00
Neil Booth
835bc4e4aa More cleanup now self.window is gone
No need for self.main_window in gui object.
No need for hooks "init_qt" and "close_main_window".
2015-09-04 18:29:52 +09:00
Neil Booth
2aa21ece79 Fix cosigner_pool plugin for multiple windows 2015-09-04 12:36:25 +09:00
Neil Booth
77a029082a Improved new_window handling.
Remove new_window hook.
Plugin informed of all windows via events when first loaded.
init_qt no longer needed for exchange_rate plugin.
2015-09-04 10:20:52 +09:00
Neil Booth
8ce2a95695 Have plugins object track the window set
No need for self.gui nor init_qt hook any more.  This makes
plugins more independent of window and gui types.
2015-09-04 09:26:35 +09:00
Neil Booth
ec3b7ba5ee Pass plugins object to plugin constructor 2015-09-04 09:07:18 +09:00
ThomasV
4cfb6e1d76 add missing parameter 2015-09-03 07:43:16 +02:00
Neil Booth
49797c3094 Create a Plugins class
Encapsulates plugin logic and removes global variable ugliness.
2015-09-03 12:02:03 +09:00
ThomasV
9d76bf6828 temporary fix wallet constructors 2015-09-02 14:37:40 +02:00
Neil Booth
7a55d02654 Fix 992c70a688
This works for ordinary wallets at least; cannot test hardware.
But after staring for ages I think it's right.
2015-09-02 21:27:12 +09:00
ThomasV
992c70a688 detect available hardware wallets before listing them in wizard 2015-09-02 13:08:06 +02:00
ThomasV
c3991091de move init_qt hook 2015-08-07 20:06:31 +02:00
ThomasV
060e3aa23e plugins: call load_wallet in install wizard 2015-06-10 12:40:08 +02:00