full-blockchain-solidity-course-js
full-blockchain-solidity-course-js copied to clipboard
Buy item script sets chain ID to "31337"
Lesson
Lesson 15
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
https://youtu.be/gyMwXuJrbJQ?t=95839
Operating System
No response
Describe the bug
On line 14 of the buy item script, rather than network.config.chainId
being compared to "31337"
(==
or ===
), it's set to "31337"
(=
.)
if ((network.config.chainId = "31337")) {
await moveBlocks(2, (sleepAmount = 1000))
}
The cancel item script contains the same error on line 12 (and the function is incorrectly named mintAndList
.)
You are using the assignment operator =
instead of a comparison operator like ==
===
. Change it and you will be good to go :)
You are using the assignment operator
=
instead of a comparison operator like==
===
. Change it and you will be good to go :)
Yes, I opened this issue to point out the mistake in the video/codebase.
@jav4di Oh yeah, sorry I read it in the wrong context.
@jav4di Oh yeah, sorry I read it in the wrong context.
No worries pal, I should’ve been clearer! I have updated the description accordingly.
@PatrickAlphaC
Whoops, thank you for this!
I have fixed, appreciate this!
I have fixed, appreciate this!
Awesome. Thank you for the brilliant course.