Example #1
0
        public async Task GetUnconfirmedBalance()
        {
            UTXO utxo    = new UTXO();
            long balance = await utxo.GetUnconfirmedBalance();

            Assert.IsNotNull(balance);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static async Task <ApiResponse> GetUnconfirmedBalance()
        {
            ApiResponse response = new ApiResponse();

            try
            {
                UTXO utxo = new UTXO();

                long result = await utxo.GetUnconfirmedBalance();

                response.Result = Newtonsoft.Json.Linq.JToken.FromObject(result);
            }
            catch (ApiCustomException ex)
            {
                Logger.Singleton.Error(ex.ToString());
                response.Error = new ApiError(ex.ErrorCode, ex.ToString());
            }
            catch (Exception ex)
            {
                Logger.Singleton.Error(ex.ToString());
                response.Error = new ApiError(ex.HResult, ex.ToString());
            }
            return(response);
        }