Skip to content

Conversation

@Ganainmtech
Copy link

Fix the Bug Submission Pull Request

What was the bug?

The error when running the file before fixing the bug showed: "TypeError: signer is not a function" This means inside the atc.addTransaction part it was not recognising the signer of the transactions.

How did you fix the bug?

I remember going through a very similar code during one of the teaching sessions from the dev-rel team, and I noticed I had to instantiate a signer. I fixed the bug by creating a signer with the algosdk makeBasicAccountTransactionSigner Function. I then passed the sender account through the parameters and I called this with the variable name senderSigner. I then replaced the sender for the senderSigner within the atc transactions.
Basically like so:

const senderSigner = algosdk.makeBasicAccountTransactionSigner(sender)
...
atc.addTransaction({txn: ptxn1, signer: senderSigner})

Console Screenshot:

image

@Ganainmtech Ganainmtech changed the title Update index.ts Fixed the bug! Mar 26, 2024
@iskysun96 iskysun96 added the Approved ✅ Successfully completed the challenge! label Apr 1, 2024
@iskysun96
Copy link
Contributor

🎉 Congrats on solving the 4th Algorand Coding Challenge!

I have labeled your PR approved, so you can now claim your certificate.

You can claim your certificate of completion NFT here:
https://goplausible.xyz/claim/8x3aqnmh7p2wf25dvmxz7ksvjs3gr02d6648tf31ny90wwtams53jvssjwcj2bgfs7qr425958h3abw83a33t3tdbqb0sjtntmta82r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved ✅ Successfully completed the challenge!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants