electrum

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

commit 7bf91fb7b6ab8b9e49c8c34c4f42836a2cb6c11d
parent 6b8725679539a050d718cf7a8ace26607002fff8
Author: ThomasV <thomasv@gitorious>
Date:   Fri,  7 Aug 2015 17:46:49 +0200

labels plugin: abort if there is not mpk

Diffstat:
Mplugins/labels.py | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/plugins/labels.py b/plugins/labels.py @@ -53,13 +53,13 @@ class Plugin(BasePlugin): @hook def load_wallet(self, wallet, window): self.wallet = wallet - self.wallet_nonce = self.wallet.storage.get("wallet_nonce") self.print_error("Wallet nonce is", self.wallet_nonce) if self.wallet_nonce is None: self.set_nonce(1) - mpk = ''.join(sorted(self.wallet.get_master_public_keys().values())) + if not mpk: + return self.encode_password = hashlib.sha1(mpk).digest().encode('hex')[:32] self.iv = hashlib.sha256(self.encode_password).digest()[:16] self.wallet_id = hashlib.sha256(mpk).digest().encode('hex') @@ -81,10 +81,6 @@ class Plugin(BasePlugin): t.setDaemon(True) t.start() - - def is_available(self): - return True - def requires_settings(self): return True