(
&self,
request: tonic::Request<pb::DisableofferRequest>,
)
| 1813 | } |
| 1814 | |
| 1815 | async fn disable_offer( |
| 1816 | &self, |
| 1817 | request: tonic::Request<pb::DisableofferRequest>, |
| 1818 | ) -> Result<tonic::Response<pb::DisableofferResponse>, tonic::Status> { |
| 1819 | let req = request.into_inner(); |
| 1820 | let req: requests::DisableofferRequest = req.try_into()?; |
| 1821 | debug!("Client asked for disable_offer"); |
| 1822 | trace!("disable_offer request: {:?}", req); |
| 1823 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1824 | .await |
| 1825 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1826 | let result = rpc.call(Request::DisableOffer(req)) |
| 1827 | .await |
| 1828 | .map_err(|e| Status::new( |
| 1829 | Code::Unknown, |
| 1830 | format!("Error calling method DisableOffer: {:?}", e)))?; |
| 1831 | match result { |
| 1832 | Response::DisableOffer(r) => { |
| 1833 | trace!("disable_offer response: {:?}", r); |
| 1834 | Ok(tonic::Response::new(r.into())) |
| 1835 | }, |
| 1836 | r => Err(Status::new( |
| 1837 | Code::Internal, |
| 1838 | format!( |
| 1839 | "Unexpected result {:?} to method call DisableOffer", |
| 1840 | r |
| 1841 | ) |
| 1842 | )), |
| 1843 | } |
| 1844 | |
| 1845 | } |
| 1846 | |
| 1847 | async fn enable_offer( |
| 1848 | &self, |
nothing calls this directly
no test coverage detected