gui fixes
This commit is contained in:
parent
13c9991be8
commit
0a7b69fc5b
14
lib/gui.py
14
lib/gui.py
|
@ -1199,10 +1199,8 @@ class ElectrumWindow:
|
||||||
for address in self.wallet.all_addresses():
|
for address in self.wallet.all_addresses():
|
||||||
if self.wallet.is_change(address):continue
|
if self.wallet.is_change(address):continue
|
||||||
label = self.wallet.labels.get(address)
|
label = self.wallet.labels.get(address)
|
||||||
n = 0
|
|
||||||
h = self.wallet.history.get(address,[])
|
h = self.wallet.history.get(address,[])
|
||||||
for item in h:
|
n = len(h)
|
||||||
if not item['is_input'] : n=n+1
|
|
||||||
tx = "None" if n==0 else "%d"%n
|
tx = "None" if n==0 else "%d"%n
|
||||||
self.recv_list.append((address, label, tx ))
|
self.recv_list.append((address, label, tx ))
|
||||||
|
|
||||||
|
@ -1217,7 +1215,7 @@ class ElectrumWindow:
|
||||||
for address in self.wallet.addressbook:
|
for address in self.wallet.addressbook:
|
||||||
label = self.wallet.labels.get(address)
|
label = self.wallet.labels.get(address)
|
||||||
n = 0
|
n = 0
|
||||||
for item in self.wallet.tx_history.values():
|
for item in self.wallet.transactions.values():
|
||||||
if address in item['outputs'] : n=n+1
|
if address in item['outputs'] : n=n+1
|
||||||
tx = "None" if n==0 else "%d"%n
|
tx = "None" if n==0 else "%d"%n
|
||||||
self.addressbook_list.append((address, label, tx))
|
self.addressbook_list.append((address, label, tx))
|
||||||
|
@ -1236,20 +1234,22 @@ class ElectrumWindow:
|
||||||
conf = 0
|
conf = 0
|
||||||
time_str = 'pending'
|
time_str = 'pending'
|
||||||
conf_icon = gtk.STOCK_EXECUTE
|
conf_icon = gtk.STOCK_EXECUTE
|
||||||
v = tx['value']
|
v = self.wallet.get_tx_value(tx_hash)
|
||||||
balance += v
|
balance += v
|
||||||
label = self.wallet.labels.get(tx_hash)
|
label = self.wallet.labels.get(tx_hash)
|
||||||
is_default_label = (label == '') or (label is None)
|
is_default_label = (label == '') or (label is None)
|
||||||
if is_default_label: label = tx['default_label']
|
if is_default_label: label = tx['default_label']
|
||||||
tooltip = tx_hash + "\n%d confirmations"%conf
|
tooltip = tx_hash + "\n%d confirmations"%conf
|
||||||
|
|
||||||
|
inputs = map(lambda x: x.get('address'), tx['inputs'])
|
||||||
|
outputs = map(lambda x: x.get('address'), tx['outputs'])
|
||||||
# tx = self.wallet.tx_history.get(tx_hash)
|
# tx = self.wallet.tx_history.get(tx_hash)
|
||||||
details = "Transaction Details:\n\n" \
|
details = "Transaction Details:\n\n" \
|
||||||
+ "Transaction ID:\n" + tx_hash + "\n\n" \
|
+ "Transaction ID:\n" + tx_hash + "\n\n" \
|
||||||
+ "Status: %d confirmations\n\n"%conf \
|
+ "Status: %d confirmations\n\n"%conf \
|
||||||
+ "Date: %s\n\n"%time_str \
|
+ "Date: %s\n\n"%time_str \
|
||||||
+ "Inputs:\n-"+ '\n-'.join(tx['inputs']) + "\n\n" \
|
+ "Inputs:\n-"+ '\n-'.join(inputs) + "\n\n" \
|
||||||
+ "Outputs:\n-"+ '\n-'.join(tx['outputs'])
|
+ "Outputs:\n-"+ '\n-'.join(outputs)
|
||||||
r = self.wallet.receipts.get(tx_hash)
|
r = self.wallet.receipts.get(tx_hash)
|
||||||
if r:
|
if r:
|
||||||
details += "\n_______________________________________" \
|
details += "\n_______________________________________" \
|
||||||
|
|
|
@ -339,12 +339,14 @@ class ElectrumWindow(QMainWindow):
|
||||||
conf = 0
|
conf = 0
|
||||||
time_str = 'pending'
|
time_str = 'pending'
|
||||||
|
|
||||||
|
inputs = map(lambda x: x.get('address'), tx['inputs'])
|
||||||
|
outputs = map(lambda x: x.get('address'), tx['outputs'])
|
||||||
tx_details = _("Transaction Details") +"\n\n" \
|
tx_details = _("Transaction Details") +"\n\n" \
|
||||||
+ "Transaction ID:\n" + tx_hash + "\n\n" \
|
+ "Transaction ID:\n" + tx_hash + "\n\n" \
|
||||||
+ "Status: %d confirmations\n\n"%conf \
|
+ "Status: %d confirmations\n\n"%conf \
|
||||||
+ "Date: %s\n\n"%time_str \
|
+ "Date: %s\n\n"%time_str \
|
||||||
+ "Inputs:\n-"+ '\n-'.join(tx['inputs']) + "\n\n" \
|
+ "Inputs:\n-"+ '\n-'.join(inputs) + "\n\n" \
|
||||||
+ "Outputs:\n-"+ '\n-'.join(tx['outputs'])
|
+ "Outputs:\n-"+ '\n-'.join(outputs)
|
||||||
|
|
||||||
r = self.wallet.receipts.get(tx_hash)
|
r = self.wallet.receipts.get(tx_hash)
|
||||||
if r:
|
if r:
|
||||||
|
|
Loading…
Reference in New Issue