diff --git a/src/cutecoin/core/wallet.py b/src/cutecoin/core/wallet.py index 2f43ea25cf0eb297d9946621f79f6e72f164f35d..145ae11265bd8a583a2063a31b433a29dd2a7038 100644 --- a/src/cutecoin/core/wallet.py +++ b/src/cutecoin/core/wallet.py @@ -10,7 +10,7 @@ from ucoinpy.documents.block import Block from ucoinpy.documents.transaction import InputSource, OutputSource, Transaction from ucoinpy.key import SigningKey -from ..tools.exceptions import NotEnoughMoneyError, Error, NoPeerAvailable, PersonNotFoundError +from ..tools.exceptions import NotEnoughMoneyError, NoPeerAvailable, PersonNotFoundError from .transfer import Transfer, Received from .person import Person @@ -140,6 +140,7 @@ class Cache(): self._parse_transaction(community, tx, block_number, block_doc.mediantime, received_list) + logging.debug("Received {0} transactions".format(len(received_list))) awaiting = [t for t in self._transfers if t.state == Transfer.AWAITING] # After we checked all transactions, we check if @@ -151,7 +152,6 @@ class Cache(): def refresh(self, community, received_list): current_block = 0 - received_list = [] try: block_data = community.current_blockid() current_block = block_data['number'] diff --git a/src/cutecoin/gui/currency_tab.py b/src/cutecoin/gui/currency_tab.py index 7f090c6386bcc8fe1d9eade0101cc8b2826fa289..90c64dbd743008c0907250e3cd8f4e7ccc093397 100644 --- a/src/cutecoin/gui/currency_tab.py +++ b/src/cutecoin/gui/currency_tab.py @@ -162,6 +162,7 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget): self.tab_history.progressbar.hide() self.refresh_status() + self.tab_history.refresh_balance() @pyqtSlot() def refresh_status(self): @@ -180,14 +181,17 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget): @pyqtSlot(list) def notify_transfers(self, transfers_list): - text = self.tr("Received {0} {1}") + transfers_txt = "" amount = 0 currency = self.community.name for t in transfers_list: amount += t.metadata['amount'] - text += """{0} -""".format(t.metadata['uid']) - text.format(amount, currency) + + logging.debug(transfers_txt) + text = self.tr("Received {0} {1} from {2} transfers").format(amount, + currency, + len(transfers_list)) + text += transfers_txt toast.display(self.tr("New transactions received"), text) def refresh_wallets(self):