ThomasV 13 years ago
parent
commit
b0c394f2be
  1. 11
      client/electrum.py

11
client/electrum.py

@ -609,6 +609,12 @@ class Wallet:
except InvalidPassword: except InvalidPassword:
return False, "Wrong password" return False, "Wrong password"
tx = filter( raw_tx( s_inputs, outputs ) ) 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 return True, tx
def sendtx(self, tx): def sendtx(self, tx):
@ -616,11 +622,6 @@ class Wallet:
out = self.send_tx(tx) out = self.send_tx(tx)
if out != tx_hash: if out != tx_hash:
return False, "error: " + out 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 return True, out

Loading…
Cancel
Save