electrum

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

commit 2a938ad516fc996c67e30fc2b607888db723c47a
parent fdf8697e5832e033f72d0b8a88cebc85a7c9eabe
Author: ThomasV <thomasv@gitorious>
Date:   Fri,  2 May 2014 11:19:02 +0200

fix: pending accounts

Diffstat:
Mlib/account.py | 3+++
Mlib/wallet.py | 11++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/account.py b/lib/account.py @@ -57,6 +57,9 @@ class PendingAccount(Account): def has_change(self): return False + def dump(self): + return {'pending':self.addresses[0]} + class ImportedAccount(Account): def __init__(self, d): self.addresses = d.keys() diff --git a/lib/wallet.py b/lib/wallet.py @@ -1361,16 +1361,17 @@ class Deterministic_Wallet(Abstract_Wallet): elif v.get('pending'): self.accounts[k] = PendingAccount(v) else: - raise + print_error("cannot load account", v) - def delete_pending_account(self, k): - assert self.is_pending_account(k) - self.accounts.pop(k) - self.save_accounts() def account_is_pending(self, k): return type(self.accounts.get(k)) == PendingAccount + def delete_pending_account(self, k): + assert self.account_is_pending(k) + self.accounts.pop(k) + self.save_accounts() + def create_pending_account(self, name, password): account_id, addr = self.next_account_address(password) self.set_label(account_id, name)