Skip to content

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

Description

@nabeel-ahmed004

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions