Skip to content

Commit

Permalink
fix(iota-indexer): fix dev_inspect_transaction_block test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiupopescu199 committed Dec 27, 2024
1 parent aa93858 commit 2f5f983
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions crates/iota-indexer/tests/rpc-tests/write_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 2f5f983

Please sign in to comment.