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

fix: add app client support for nested method call #330

Merged
merged 8 commits into from
Oct 19, 2024

Conversation

neilcampbell
Copy link
Contributor

Ensure the correct transaction group is built when an ABI method call has an ABI method call argument.

@neilcampbell neilcampbell changed the title feat: add app client support for nested method call fix: add app client support for nested method call Oct 18, 2024
// An undefined transaction argument signals that the value will be supplied by a method call argument
if (algosdk.abiTypeIsTransaction(params.method.args[i].type) && transactionsForGroup.length > 0) {
// Move the last transaction from the group to the method call arguments to appease algosdk
const placeholderTransaction = transactionsForGroup.splice(-1, 1)[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

splice mutates the array - desired?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, it is.

@@ -1218,6 +1236,8 @@ export default class AlgoKitComposer {
return { atc: this.atc, transactions: this.atc.buildGroup(), methodCalls: this.atc['methodCalls'] }
}

// TODO: NC - Docs about the behaviour
Copy link
Contributor

Choose a reason for hiding this comment

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

todo

@neilcampbell neilcampbell merged commit b538731 into main Oct 19, 2024
2 checks passed
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.

3 participants