electrum

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

commit 10faf75ee75cf04b04c6612d623efc01b75e48fd
parent 642258ebaa9817b03a0b2dcde602b2a15a534775
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 30 Jul 2014 12:46:03 +0200

wallet fixes

Diffstat:
Mlib/transaction.py | 6+++---
Mlib/wallet.py | 4+++-
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/transaction.py b/lib/transaction.py @@ -840,7 +840,7 @@ class Transaction: def as_dict(self): import json out = { - "hex":self.raw, + "hex":str(self), "complete":self.is_complete() } return out @@ -849,8 +849,8 @@ class Transaction: def requires_fee(self, verifier): # see https://en.bitcoin.it/wiki/Transaction_fees threshold = 57600000 - size = len(self.raw)/2 - if size >= 10000: + size = len(str(self))/2 + if size >= 10000: return True for o in self.get_outputs(): diff --git a/lib/wallet.py b/lib/wallet.py @@ -355,7 +355,9 @@ class Abstract_Wallet(object): return self.accounts[account_id].get_pubkeys(*sequence) def add_keypairs(self, tx, keypairs, password): - # first check the provided password. This will raise if invalid. + + if self.is_watching_only(): + return self.check_password(password) addr_list, xpub_list = tx.inputs_to_sign()