public DataResponse <List <NTMinerWalletData> > NTMinerWallets([FromBody] NTMinerWalletsRequest request) { try { var data = HostRoot.Instance.NTMinerWalletSet.GetAll(); return(DataResponse <List <NTMinerWalletData> > .Ok(data)); } catch (Exception e) { Logger.ErrorDebugLine(e); return(ResponseBase.ServerError <DataResponse <List <NTMinerWalletData> > >(e.Message)); } }
public void GetNTMinerWalletsAsync(Action <DataResponse <List <NTMinerWalletData> >, Exception> callback) { try { NTMinerWalletsRequest request = new NTMinerWalletsRequest { }; RpcRoot.PostAsync(_host, _port, _controllerName, nameof(INTMinerWalletController.NTMinerWallets), request, callback); } catch (Exception e) { Logger.ErrorDebugLine(e); callback?.Invoke(null, e); } }