From 838b5816c7a573eec80c407196fb1878b713057e Mon Sep 17 00:00:00 2001 From: Thomas Niederberger Date: Thu, 24 Oct 2024 13:54:07 +0200 Subject: [PATCH] Add documentation --- src/api/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/mod.rs b/src/api/mod.rs index 13d88c0a4..9492cd062 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -66,6 +66,8 @@ impl ExtrinsicReport { self.events = Some(events.into_iter().map(|event| event.to_raw()).collect()); } + /// Checks the status of the extrinsic by evaluating the events attached to the report. + /// Returns an error if the events are missing or if one of the events indicates a problem. pub fn status_based_on_events(&self, metadata: &Metadata) -> Result<()> { if self.events.is_none() { return Err(Error::Other("Report does not contain any events".into()))