diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/NodeRepository.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/NodeRepository.kt index b7105fd..abaaafa 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/NodeRepository.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/NodeRepository.kt @@ -86,8 +86,8 @@ class NodeRepository(private val nodeDao: NodeDao) { val updatePeriod = Constants.NODES_UPDATE_PERIOD // Verify if nodes list should be updated if (now - updatePeriod > lastUpdate) { - val response = mBitsyWebservice?.getNodes() try { + val response = mBitsyWebservice?.getNodes() // Update the list of nodes only if we got at least MIN_NODES_SIZE nodes if (response?.isSuccessful == true && (response.body()?.size ?: 0) >= MIN_NODES_SIZE) { val nodesWS = response.body() ?: return