electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 84450b9189f49c23aaae47ecdb80652085b9c582
parent ed3c0a546982dd74ca850e9ae528a241be4aebe2
Author: Neil Booth <kyuupichan@gmail.com>
Date:   Tue, 29 Dec 2015 23:16:53 +0900

Revert mistaken commit

Diffstat:
Mlib/wallet.py | 5++++-
Mplugins/ledger/ledger.py | 3+++
Mplugins/trezor/plugin.py | 3+++
Mplugins/trustedcoin/trustedcoin.py | 3+++
4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1916,7 +1916,10 @@ class Wallet(object): if wallet_type: for cat, t, name, loader in wallet_types: if t == wallet_type: - WalletClass = loader + if cat in ['hardware', 'twofactor']: + WalletClass = lambda storage: apply(loader().constructor, (storage,)) + else: + WalletClass = loader break else: if re.match('(\d+)of(\d+)', wallet_type): diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py @@ -424,6 +424,9 @@ class LedgerPlugin(BasePlugin): self.wallet = None self.handler = None + def constructor(self, s): + return BTChipWallet(s) + def is_enabled(self): if not BTCHIP: return False diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py @@ -158,6 +158,9 @@ class TrezorCompatiblePlugin(BasePlugin): self.handler = None self.client = None + def constructor(self, s): + return self.wallet_class(s) + def give_error(self, message): self.print_error(message) raise Exception(message) diff --git a/plugins/trustedcoin/trustedcoin.py b/plugins/trustedcoin/trustedcoin.py @@ -276,6 +276,9 @@ class TrustedCoinPlugin(BasePlugin): BasePlugin.__init__(self, parent, config, name) self.seed_func = lambda x: bitcoin.is_new_seed(x, SEED_PREFIX) + def constructor(self, s): + return Wallet_2fa(s) + def is_available(self): return True