private static bool CheckIfShouldMine(double currentProfit, bool log = true) { var isProfitable = CheckIfProfitable(currentProfit, log); ApplicationStateManager.SetProfitableState(isProfitable); ApplicationStateManager.DisplayNoInternetConnection(!_isConnectedToInternet); if (!_isConnectedToInternet && log) { Logger.Info(Tag, $"No internet connection! Not able to mine."); } // if profitable and connected to internet mine var shouldMine = isProfitable && _isConnectedToInternet; return(shouldMine); }