Пример #1
0
        public static decimal CheckAdressBalance(string address)
        {
            decimal addressBalance       = 0;
            bool    isAdressValidAndMine = false;

            isAdressValidAndMine = IsAddressValidAndMine(address);
            try
            {
                addressBalance = CoinService.GetAddressBalance(address, 2, true);
            }
            catch (RpcException exception)
            {
                //                Debug.WriteLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception);
                bitcoin_Logger.LogLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception, responseTip.Helpers.Logger.log_types.ERROR_LOG);
                //                newBtcAdress = "RPC exception";
            }
            catch (Exception e)
            {
                //                Debug.WriteLine("General exception at: " + e.StackTrace);
                bitcoin_Logger.LogLine("General exception at: " + e.StackTrace, responseTip.Helpers.Logger.log_types.ERROR_LOG);
                //                newBtcAdress = "General exception";
            }

//            bitcoin_Logger.LogLine(address + " has " + addressBalance + " and is valid and mine.",responseTip.Helpers.Logger.log_types.MESSAGE_LOG);

            return(addressBalance);
        }