diff --git a/crates/iota-indexer/tests/rpc-tests/write_api.rs b/crates/iota-indexer/tests/rpc-tests/write_api.rs index 200e80f66d9..5775dbb9f70 100644 --- a/crates/iota-indexer/tests/rpc-tests/write_api.rs +++ b/crates/iota-indexer/tests/rpc-tests/write_api.rs @@ -159,21 +159,18 @@ fn dev_inspect_transaction_block() { IotaExecutionStatus::Success ); - let owner = indexer_devinspect_results + let (seq_num, owner) = indexer_devinspect_results .effects .mutated() .iter() - .find_map(|obj| (obj.reference.object_id == obj_id).then_some(obj.owner)) + .find_map(|obj| { + (obj.reference.object_id == obj_id).then_some((obj.reference.version, obj.owner)) + }) .unwrap(); assert_eq!(owner, Owner::AddressOwner(receiver)); - let latest_checkpoint_seq_number = client - .get_latest_checkpoint_sequence_number() - .await - .unwrap(); - - indexer_wait_for_checkpoint(store, latest_checkpoint_seq_number.into_inner() + 1).await; + indexer_wait_for_object(client, obj_id, seq_num).await; let actual_object_info = client .get_object(obj_id, Some(IotaObjectDataOptions::new().with_owner()))