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

Updated add transaction to use transaction signer instead of account object #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

calvin-do
Copy link

Updated add transaction to use transaction signer instead of account object

Fix the Bug Submission Pull Request

What was the bug?

addTransaction was using an account object instead of a signer object

How did you fix the bug?

Created an account transaction signer and then sent the transaction signer instead of the account.

Ran algokit bootstrap all
image

Tried running npm run start

Got the following error:
image

I've made the code change that I think is correct here, but not sure what is going above... will try to look for solutions online

@calvin-do
Copy link
Author

calvin-do commented Mar 26, 2024

Looks like this might be the root cause?: nodejs/undici#902 & nodejs/undici#1412

@calvin-do
Copy link
Author

calvin-do commented Mar 26, 2024

Furthermore, this stackoverflow page talks about this issue; https://stackoverflow.com/questions/76931498/typeerror-terminated-cause-socketerror-other-side-closed-in-fetch-nodejs

The proposed solution is to use the response ; nodejs/undici#583 (comment)
Stackoverflow page recommends to clone the response to avoid the socket error.

That would have to happen here i suppose

@calvin-do
Copy link
Author

Tried making the change locally but looks like that's not doing anything...
image

Also saw a post saying that newer versions of undici (>4.0) requires content-length heading or a transfer-encoding headers. Not sure if those are currently being passed in. It's also possible that the source of the error is from a different place and I'm reading this incorrectly.

@joe-p
Copy link

joe-p commented Apr 1, 2024

How are you running your localnet? Are you using algokit localnet or running it by some other means?

@iskysun96
Copy link
Contributor

could you try resetting and updating your localnet to the latest version? algokit localnet reset --update

@calvin-do
Copy link
Author

calvin-do commented Apr 1, 2024

How are you running your localnet? Are you using algokit localnet or running it by some other means?

@joe-p previously i was running the container in docker desktop. but i can use algokit localnet start from now on.

@iskysun96
after upgrading algokit and then updating the localnet;
image

@calvin-do
Copy link
Author

So I did some poking around and it looked like there were several dangling instances of algod and postgres in my docker desktop images that was causing the problem. I deleted all images and all containers and re-ran algokit localnet start. A fresh wipe seemed to do the trick, but not sure how it ended up in that state.

image

@calvin-do
Copy link
Author

calvin-do commented Apr 3, 2024

@joe-p @iskysun96 With the above updates, I believe this PR is ready for re-review, thanks!

@iskysun96
Copy link
Contributor

iskysun96 commented Apr 30, 2024

Sorry for missing this!! Great job!

🎉 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.

3 participants