(&mut self, matches: &ArgMatches)
| 502 | } |
| 503 | |
| 504 | pub async fn handle_broadcast(&mut self, matches: &ArgMatches) -> Response { |
| 505 | self.sync().await; |
| 506 | let arg = "GRAPH_ID"; |
| 507 | let Some(peg_in_graph_id) = matches.get_one::<String>(arg) else { |
| 508 | return Response::new( |
| 509 | ResponseStatus::NOK(format!("Missing argument: {}", arg)), |
| 510 | None, |
| 511 | ); |
| 512 | }; |
| 513 | let result = self |
| 514 | .client |
| 515 | .retry_broadcast_peg_in_deposit(peg_in_graph_id) |
| 516 | .await; |
| 517 | |
| 518 | match result { |
| 519 | Ok(result) => Response::new(ResponseStatus::OK, Some(result)), |
| 520 | Err(err) => Response::new(ResponseStatus::NOK(err), None), |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | pub fn peg_in_graphs_command() -> Command { |
| 525 | Command::new("pegins") |
no test coverage detected