Skip to content

chore: integration test for sending and waiting for asset transfers #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CiottiGiorgio
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 27, 2025 09:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an integration test for asset transfer transactions and introduces a waitForConfirmation helper function to verify transaction confirmations. Key changes include updating transaction creation to support both payment and asset transfer types, adding a busy-loop based waitForConfirmation function, and updating a dependency version in package.json.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/typescript/algod_api/tests/transactions.test.ts Added integration tests for transaction confirmation and asset transfer support, along with a new waitForConfirmation helper.
packages/typescript/algod_api/package.json Updated the dependency for @algorandfoundation/algokit-transact to a newer alpha version.

@@ -45,6 +51,18 @@ const createSignedTxnHttpFile = (
return httpFile;
};

async function waitForConfirmation(
Copy link
Preview

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The waitForConfirmation function employs a continuous loop without any delay or timeout, which may result in high CPU usage. Consider adding an asynchronous delay (e.g., using setTimeout or a sleep function) and a timeout mechanism to break the loop if confirmation takes too long.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant