electrum

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

commit 9dc8393cf6373bbb9c131ed24c7f372025d0d10e
parent 9a8f9cefed436d58aec6e239b91749300e8a9765
Author: ThomasV <thomasv@gitorious>
Date:   Thu, 28 May 2015 15:39:26 +0200

move import test to wallet.py

Diffstat:
Mlib/commands.py | 1-
Mlib/wallet.py | 1+
2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/commands.py b/lib/commands.py @@ -277,7 +277,6 @@ class Commands: return s.encode('utf8') def importprivkey(self, sec): - assert self.wallet.can_import() try: addr = self.wallet.import_key(sec,self.password) out = "Keypair imported: ", addr diff --git a/lib/wallet.py b/lib/wallet.py @@ -288,6 +288,7 @@ class Abstract_Wallet(object): return account is not None def import_key(self, sec, password): + assert self.can_import() try: pubkey = public_key_from_private_key(sec) address = public_key_to_bc_address(pubkey.decode('hex'))