electrum

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

commit cf8c4aa491690de6c004d219422643f586745e21
parent 426501d5b8f397a236aeb30fdeb6b18b713c903f
Author: ThomasV <thomasv@gitorious>
Date:   Tue, 11 Feb 2014 14:44:52 +0100

fix: do not create wallet if seed is empty because user typed gibberish

Diffstat:
Mlib/wallet.py | 16+++-------------
1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -325,20 +325,10 @@ class Wallet: words = seed.split() self.seed_version = 4 self.seed = mnemonic.mn_decode(words) + + if not self.seed: + raise Exception("Invalid seed") - #try: - # mnemonic.mn_decode(words) - # uses_electrum_words = True - #except Exception: - # uses_electrum_words = False - # - #if uses_electrum_words and len(words) != 13: - # self.seed_version = 4 - # self.seed = mnemonic.mn_decode(words) - #else: - # assert mnemonic_hash(seed).startswith(SEED_PREFIX) - # self.seed_version = SEED_VERSION - # self.seed = seed def save_seed(self, password):