Skip to content

Conversation

@jasonpaulos
Copy link
Contributor

Add wait for confirmation function for verifying transaction confirmation.

Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

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

Nice addition to the JS SDK 🎉

I'm also curious to whether this should be kept with algod or transactions (I believe the Python SDK binds this method to the latter).

await this.v2Client.statusAfterBlock(sp.firstRound + 2).do();
const fundingConfirmation = await this.acl.transactionById(
fundingResponse.txId
const info = await algosdk.waitForConfirmation(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice -- also what is this.acl? Is that the v1 client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that's the v1 algod client

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

I don't have general comments here. Just curious, why there are 2 alike implementation for WaitForConfirmation in JS-SDK?

Copy link
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

LGTM

@jasonpaulos
Copy link
Contributor Author

My bad, I originally forgot to delete the file in the algod client folder.

@jasonpaulos jasonpaulos merged commit 70c68f2 into develop Nov 10, 2021
@jasonpaulos jasonpaulos deleted the wait-for-confirmation branch November 10, 2021 22:23
aldur pushed a commit that referenced this pull request Jan 20, 2022
* Added waitForConfirmation to v2 API

* Renamed timeout to waitRounds

* Move to waitForConfirmation function

* Change eslint settings

* Use in cucumber tests

* Delete file from algod folder

Co-authored-by: Damian Barabonkov <damianb@mit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants