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.

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.