tFix a couple of bugs. - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 2c67de8f642a182dd76c706b65c14eeeeee64d03 DIR parent 9d76bf6828064699f6bb68aea8a38903754633cd HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Thu, 3 Sep 2015 10:42:42 +0900 Fix a couple of bugs. Diffstat: M plugins/exchange_rate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- DIR diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py t@@ -171,10 +171,11 @@ class Plugin(BasePlugin): self.btc_rate = Decimal("0.0") self.network = None self.gui = None + self.wallet_tx_list = {} @hook def set_network(self, network): - if self.gui and network != self.network: + if network != self.network: if self.network: self.network.remove_job(self.exchanger) self.network = network t@@ -257,7 +258,7 @@ class Plugin(BasePlugin): tx_hash, conf, value, timestamp, balance = item tx_list[tx_hash] = {'value': value, 'timestamp': timestamp } - wallet.fx_tx_list = tx_list + self.wallet_tx_list[wallet] = tx_list self.set_network(wallet.network) t = threading.Thread(target=self.request_history_rates, args=(tx_list,)) t.setDaemon(True) t@@ -315,9 +316,9 @@ class Plugin(BasePlugin): for window in self.gui.windows: wallet = window.wallet - if not wallet: + tx_list = self.wallet_tx_list.get(wallet) + if not wallet or not tx_list: continue - tx_list = wallet.fx_tx_list window.is_edit = True window.history_list.setColumnCount(7) window.history_list.setHeaderLabels([ '', '', _('Date'), _('Description') , _('Amount'), _('Balance'), _('Fiat Amount')] )