public async Task <EthereumResponse <bool> > IsSynced(string coinAdapterAddress, string userAddress) { var response = await _ethereumApi.ApiExchangeCheckPendingTransactionPostAsync(new CheckPendingModel { UserAddress = userAddress, CoinAdapterAddress = coinAdapterAddress }); var error = response as ApiException; if (error != null) { return(new EthereumResponse <bool> { Error = new ErrorResponse { Code = error.Error.Code, Message = error.Error.Message } }); } var res = response as CheckPendingResponse; if (res != null) { return(new EthereumResponse <bool> { Result = res.IsSynced }); } throw new Exception("Unknown response"); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static object ApiExchangeCheckPendingTransactionPost(this IEthereumApi operations, CheckPendingModel model = default(CheckPendingModel)) { return(operations.ApiExchangeCheckPendingTransactionPostAsync(model).GetAwaiter().GetResult()); }