1
0

More improvements to exchange_rate plugin

- better historical rate handling, including caching
- grabbing and scanning wallet transactions no longer needed
- fix autosize of fiat column
- more efficient
This commit is contained in:
Neil Booth
2015-09-05 14:05:37 +09:00
parent 8d046c7919
commit 9da22000b6
3 changed files with 106 additions and 139 deletions

View File

@@ -54,8 +54,9 @@ class HistoryWidget(MyTreeWidget):
item = self.currentItem()
current_tx = item.data(0, Qt.UserRole).toString() if item else None
self.clear()
for item in h:
tx_hash, conf, value, timestamp, balance = item
entries = []
for tx in h:
tx_hash, conf, value, timestamp, balance = tx
if conf is None and timestamp is None:
continue # skip history in offline mode
icon, time_str = self.get_icon(conf, timestamp)
@@ -76,7 +77,8 @@ class HistoryWidget(MyTreeWidget):
self.insertTopLevelItem(0, item)
if current_tx == tx_hash:
self.setCurrentItem(item)
run_hook('history_tab_update', self.parent)
entries.append((item, tx))
run_hook('history_tab_update', self.parent, entries)
def update_item(self, tx_hash, conf, timestamp):
icon, time_str = self.get_icon(conf, timestamp)