diff --git a/crates/sui-graphql-client/src/lib.rs b/crates/sui-graphql-client/src/lib.rs index 6eae7b790..3dc791120 100644 --- a/crates/sui-graphql-client/src/lib.rs +++ b/crates/sui-graphql-client/src/lib.rs @@ -735,7 +735,7 @@ impl Client { &self, address: Address, pagination_filter: PaginationFilter<'a>, - ) -> Result>, Error> { + ) -> Result, Error> { let (after, before, first, last) = self.pagination_filter(pagination_filter); let operation = DynamicFieldsOwnerQuery::build(DynamicFieldConnectionArgs { address, @@ -751,10 +751,10 @@ impl Client { } let Some(DynamicFieldsOwnerQuery { owner: Some(dfs) }) = response.data else { - return Ok(Some(Page::new_empty())); + return Ok(Page::new_empty()); }; - Ok(Some(Page::new( + Ok(Page::new( dfs.dynamic_fields.page_info, dfs.dynamic_fields .nodes @@ -762,7 +762,7 @@ impl Client { .map(TryInto::try_into) .collect::, Error>>() .map_err(|e| Error::msg(format!("{:?}", e)))?, - ))) + )) } // =========================================================================== diff --git a/crates/sui-graphql-client/src/query_types/dynamic_fields.rs b/crates/sui-graphql-client/src/query_types/dynamic_fields.rs index e238c79be..7c4d59715 100644 --- a/crates/sui-graphql-client/src/query_types/dynamic_fields.rs +++ b/crates/sui-graphql-client/src/query_types/dynamic_fields.rs @@ -184,18 +184,3 @@ impl TryFrom for DynamicFieldOutput { }) } } - -// impl From for DynamicFieldOutput { -// fn from(val: DynamicField) -> DynamicFieldOutput { -// DynamicFieldOutput { -// name: crate::DynamicFieldName { -// type_: TypeTag::from_str(val.name.as_ref().unwrap().type_.as_str()), -// bcs: base64ct::Base64::decode_vec(val.name.as_ref().unwrap().bcs.0.as_ref()) -// .unwrap(), -// json: val.name.as_ref().unwrap().json.clone(), -// }, -// value_as_json: val.field_value_json(), -// value: val.value.and_then(|x| x.type_bcs()), -// } -// } -// }