Skip to content
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

Suggestion: Add 'AwaitResult' or equivalent to the SDKs #4

Open
lock9 opened this issue Mar 9, 2024 · 0 comments
Open

Suggestion: Add 'AwaitResult' or equivalent to the SDKs #4

lock9 opened this issue Mar 9, 2024 · 0 comments

Comments

@lock9
Copy link

lock9 commented Mar 9, 2024

Hi,

SDK users must use the transactionCompletion from the Utils package in order to view the TX results. This requires 2 lines of code for every invocation.

Suggestion:

  • Allow users to await for the transaction results in a single line. This could be done either by adding methods with an extra prefix or suffix. Example:

Current Code:

const txid = await collection.sampleFromCollection({
    collectionId: 1
})
const result = await Utils.transactionCompletion(txid)

Updated code:

const result = await collection.sampleFromCollection({
    collectionId: 1
}).AwaitResult()

I didn't find test invoke examples. I don't know if the SDK does that by itself or if users must do this extra check. Is it possible to do a test invoke?

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

No branches or pull requests

1 participant