From 3bd3795e2c2b799cd9dfecfa1f619cf16c9d887e Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 5 Sep 2020 09:34:03 +0200 Subject: [PATCH] chore: improve docs for Connection.confirmTransaction method (#11889) Co-authored-by: Paul Schaaf --- web3.js/src/connection.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index b6d1618863..93c95ba57c 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -1947,7 +1947,10 @@ export class Connection { } /** - * Confirm the transaction identified by the specified signature + * Confirm the transaction identified by the specified signature. + * + * If `confirmations` count is not specified, wait for transaction to be finalized. + * */ async confirmTransaction( signature: TransactionSignature, @@ -1960,7 +1963,7 @@ export class Connection { for (;;) { const status = statusResponse.value; if (status) { - // Received a status, if not an error wait for confirmation + // 'status.confirmations === null' implies that the tx has been finalized if ( status.err || status.confirmations === null ||