diff --git a/explorer/src/api/graphql/mod.rs b/explorer/src/api/graphql/mod.rs index 75212af8f0..7894eb8aed 100644 --- a/explorer/src/api/graphql/mod.rs +++ b/explorer/src/api/graphql/mod.rs @@ -877,11 +877,9 @@ impl Transaction { &self, context: &Context<'_>, ) -> FieldResult> { - let transaction = self.get_contents(context).await?; - match transaction.certificate { - Some(c) => Certificate::try_from(c).map(Some).map_err(|e| e.into()), - None => Ok(None), - } + self.get_contents(context) + .await + .map(|transaction| transaction.certificate.map(Certificate::from)) } }