[Help] Replacing "await" with "then" #4962
Unanswered
SSantiago90
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I'm on lesson 6, and playing around I tried to replace an "await" call with a .then method... but it doesn't work as (at least I) expected.
Working code with await👇
refactoring using .then (only "deploying" console.log shows up in the console)🛑
It's not a big of a deal, I could just leave it as is using "await", but I'd like to know if I'm doing something wrong. Maybe it's because I'm using a .then chainned method inside an Async function? It's a javascript related issue or it has something to do with Hardhat?
Even if I do something like this without nesting promises, I get not message in the console
attached running example

Beta Was this translation helpful? Give feedback.
All reactions