tfix - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit b0c394f2be901a67091ddef5782537cb8c0fd463
DIR parent b4f666d8d3a28232d2917c5db551e5848423d5b1
HTML Author: ThomasV <thomasv@gitorious>
Date: Wed, 16 Nov 2011 22:47:17 +0100
fix
Diffstat:
M client/electrum.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
DIR diff --git a/client/electrum.py b/client/electrum.py
t@@ -609,6 +609,12 @@ class Wallet:
except InvalidPassword:
return False, "Wrong password"
tx = filter( raw_tx( s_inputs, outputs ) )
+ if to_address not in self.addressbook:
+ self.addressbook.append(to_address)
+ if label:
+ tx_hash = Hash(tx.decode('hex') )[::-1].encode('hex')
+ wallet.labels[tx_hash] = label
+ wallet.save()
return True, tx
def sendtx(self, tx):
t@@ -616,11 +622,6 @@ class Wallet:
out = self.send_tx(tx)
if out != tx_hash:
return False, "error: " + out
- if to_address not in self.addressbook:
- self.addressbook.append(to_address)
- if label:
- wallet.labels[tx_hash] = label
- wallet.save()
return True, out