Skip to content

Commit

Permalink
fix(iota-indexer): get object packages (#3610)
Browse files Browse the repository at this point in the history
* fix(iota-indexer): get object packages

* fixup! fix(iota-indexer): get object packages
  • Loading branch information
sergiupopescu199 authored Oct 24, 2024
1 parent 9cb59c0 commit 517f2d9
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 5 deletions.
75 changes: 74 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions crates/iota-indexer/src/models/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,9 @@ impl StoredObject {
) -> Result<ObjectRead, IndexerError> {
let oref = self.get_object_ref()?;
let object: iota_types::object::Object = self.try_into()?;

let Some(move_object) = object.data.try_as_move().cloned() else {
return Err(IndexerError::PostgresRead(format!(
"Object {:?} is not a Move object",
oref,
)));
return Ok(ObjectRead::Exists(oref, object, None));
};

let move_type_layout = package_resolver
Expand Down

0 comments on commit 517f2d9

Please sign in to comment.