fix: fallback to connection commitment when confirming transactions (#13285)

* fix: fallback to connection commitment when confirming transactions

* chore: bump

* chore: fix tests
This commit is contained in:
Justin Starry
2020-10-30 01:22:53 +08:00
committed by GitHub
parent 636ae12621
commit 7b3f96ab30
3 changed files with 4 additions and 6 deletions

View File

@@ -2163,8 +2163,6 @@ export class Connection {
/**
* Confirm the transaction identified by the specified signature.
*
* If `commitment` is not specified, default to 'max'.
*/
async confirmTransaction(
signature: TransactionSignature,
@@ -2180,7 +2178,7 @@ export class Connection {
assert(decodedSignature.length === 64, 'signature has invalid length');
const start = Date.now();
const subscriptionCommitment: Commitment = commitment || 'max';
const subscriptionCommitment = commitment || this.commitment;
let subscriptionId;
let response: RpcResponseAndContext<SignatureResult> | null = null;