From 05600ace92621ddf826eb81d0b4d8a7fb7d910a3 Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Fri, 3 Jul 2015 05:37:53 +0200
Subject: [PATCH] Fix txhistory refresh

---
 src/cutecoin/core/txhistory.py | 3 +--
 src/cutecoin/core/wallet.py    | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/cutecoin/core/txhistory.py b/src/cutecoin/core/txhistory.py
index 3f8fae1a..f32b0e03 100644
--- a/src/cutecoin/core/txhistory.py
+++ b/src/cutecoin/core/txhistory.py
@@ -136,8 +136,7 @@ class TxHistory():
         :param list received_list: List of transactions received
         """
         parsed_block = self.latest_block
-        block_data = yield from community.blockid()
-        current_block = block_data['number']
+        current_block = community.network.latest_block
         logging.debug("Refresh from : {0} to {1}".format(self.latest_block, current_block))
         new_transfers = []
         # Lets look if transactions took too long to be validated
diff --git a/src/cutecoin/core/wallet.py b/src/cutecoin/core/wallet.py
index cc8aadcc..3d996bee 100644
--- a/src/cutecoin/core/wallet.py
+++ b/src/cutecoin/core/wallet.py
@@ -114,7 +114,7 @@ class Wallet(QObject):
         :param community: The community to refresh its cache
         """
         logging.debug("Refresh transactions for {0}".format(self.pubkey))
-        asyncio.async(self.caches[community.currency].refresh_identities(community, received_list))
+        asyncio.async(self.caches[community.currency].refresh(community, received_list))
 
     def check_password(self, salt, password):
         """
-- 
GitLab