Skip to content

Commit

Permalink
feat(op receipt): re-add wait_for_user_operation_receipt to end to en…
Browse files Browse the repository at this point in the history
…d tests
  • Loading branch information
jackpooleywc committed Sep 16, 2024
1 parent 46b2a9a commit 3e67695
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/yttrium/src/account_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ mod tests {

println!("user_operation_hash: {:?}", user_operation_hash);

let receipt = account_client
.wait_for_user_operation_receipt(user_operation_hash)
.await?;

println!("receipt: {:?}", receipt);

Ok(())
}

Expand Down
12 changes: 12 additions & 0 deletions crates/yttrium/src/transaction/send/simple_account_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,18 @@ mod tests {
)
.await?;

println!("Querying for receipts...");

let receipt = bundler_client
.wait_for_user_operation_receipt(user_operation_hash.clone())
.await?;

let tx_hash = receipt.receipt.transaction_hash;
println!(
"UserOperation included: https://sepolia.etherscan.io/tx/{}",
tx_hash
);

Ok(user_operation_hash)
}

Expand Down

0 comments on commit 3e67695

Please sign in to comment.