From 5ee708aaa23757a359e3755ddb4f63c322b92cf5 Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 17 Dec 2012 16:03:10 +0100 Subject: [PATCH] Fix receiving addresses for pruned servers --- lib/receiving_widget.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/receiving_widget.py b/lib/receiving_widget.py index 5346e5a6..3b0b581a 100644 --- a/lib/receiving_widget.py +++ b/lib/receiving_widget.py @@ -44,10 +44,14 @@ class ReceivingWidget(QTreeWidget): # It appears that at this moment history can either be an array with tx and block height # Or just a tx that's why this ugly code duplication is in, will fix if len(history) == 1: - for tx_hash in history: - tx = self.owner.actuator.wallet.transactions.get(tx_hash) - if tx: - used = "Yes" + # This means pruned data. If that's the case the address has to been used at one point + if history[0] == "*": + used = "Yes" + else: + for tx_hash in history: + tx = self.owner.actuator.wallet.transactions.get(tx_hash) + if tx: + used = "Yes" else: for tx_hash, height in history: tx = self.owner.actuator.wallet.transactions.get(tx_hash)