chore: improve docs for Connection.confirmTransaction method (#11889)
Co-authored-by: Paul Schaaf <paul.schaaf@maibornwolff.de>
This commit is contained in:
parent
023bb8f150
commit
3bd3795e2c
|
@ -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(
|
async confirmTransaction(
|
||||||
signature: TransactionSignature,
|
signature: TransactionSignature,
|
||||||
|
@ -1960,7 +1963,7 @@ export class Connection {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const status = statusResponse.value;
|
const status = statusResponse.value;
|
||||||
if (status) {
|
if (status) {
|
||||||
// Received a status, if not an error wait for confirmation
|
// 'status.confirmations === null' implies that the tx has been finalized
|
||||||
if (
|
if (
|
||||||
status.err ||
|
status.err ||
|
||||||
status.confirmations === null ||
|
status.confirmations === null ||
|
||||||
|
|
Loading…
Reference in New Issue