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

I am currently having an issue and the issue is that I cannot console.log the number of confirmations like in Lesson 8 of the course. #6713

Open
nabeel-ahmed004 opened this issue Aug 14, 2024 · 0 comments

Comments

@nabeel-ahmed004
Copy link

The following is my listenForTxMined function in which I am listening for the transaction to finish.

function listenForTxMined(transactionResponse, provider) {
  console.log(`Mining ${transactionResponse.hash}...`);

  return new Promise((resolve, reject) => {
    provider.once(transactionResponse.hash, (transactionReceipt) => {
      console.log(
        `Completed with ${transactionReceipt.confirmations} confirmations. `
              );
      resolve(); 
    });
  });
}

But I am getting the following output in my console.

image

My code is performing fund and withdraw functions as it should and everything else is also working properly but I cannot get the number of transaction confirmations. I can provide additional details if they are required. Thanks in advance.

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

No branches or pull requests

1 participant