示例#1
0
        public static bool IsAdministratorAddress(string address, CryptocurrencyAPIProvider cryptocurrencyAPI)
        {
            var adminAddresses = BitcoinAddress.GetAddress(address, cryptocurrencyAPI);

            if (adminAddresses != null)
            {
                return(true);
            }

            return(false);
        }
示例#2
0
        //public static string UpperCaseUrlEncode(string s)
        //{
        //    char[] temp = HttpUtility.UrlEncode(s).ToCharArray();
        //    for (int i = 0; i < temp.Length - 2; i++)
        //    {
        //        if (temp[i] == '%')
        //        {
        //            temp[i + 1] = char.ToUpper(temp[i + 1]);
        //            temp[i + 2] = char.ToUpper(temp[i + 2]);
        //        }
        //    }
        //    return new string(temp);
        //}

        public string TryGetAdminAddress()
        {
            try
            {
                string adminAddress = BitcoinAddress.GetAddress(Member.CurrentId, ApiType);

                if (String.IsNullOrEmpty(adminAddress))
                {
                    adminAddress = CreateNewAddress(Member.CurrentId);
                }

                return(adminAddress);
            }
            catch (Exception ex)
            {
                ErrorLogger.Log(ex);
                return(string.Empty);
            }
        }