tshow address if coins were received at a change address - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 12e2b8db16eebd4f647361913c20edfe8dcc3bcb DIR parent 36daa3209191791715bfb72e5f3ddc8b3bf151e5 HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 19 May 2012 11:01:45 +0200 show address if coins were received at a change address Diffstat: M lib/wallet.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -766,11 +766,21 @@ class Wallet: else: for o_addr in tx['outputs']: if self.is_mine(o_addr) and not self.is_change(o_addr): - dest_label = self.labels.get(o_addr) - if dest_label: - default_label = 'at: ' + dest_label - else: - default_label = 'at: ' + o_addr + break + else: + for o_addr in tx['outputs']: + if self.is_mine(o_addr): + break + else: + o_addr = None + + if o_addr: + dest_label = self.labels.get(o_addr) + if dest_label: + default_label = 'at: ' + dest_label + else: + default_label = 'at: ' + o_addr + tx['default_label'] = default_label def mktx(self, to_address, amount, label, password, fee=None, change_addr=None, from_addr= None):