fix: default preflight commitment to confirmation commitment

This commit is contained in:
Michael Vines
2020-11-16 09:15:51 -08:00
parent c2f77a3473
commit bde1e3d004
3 changed files with 14 additions and 9 deletions

View File

@@ -2933,15 +2933,10 @@ export class Connection {
const skipPreflight = options && options.skipPreflight;
const preflightCommitment = options && options.preflightCommitment;
if (skipPreflight && preflightCommitment) {
throw new Error(
'cannot set preflightCommitment when skipPreflight is enabled',
);
}
if (skipPreflight) {
config.skipPreflight = skipPreflight;
} else if (preflightCommitment) {
}
if (preflightCommitment) {
config.preflightCommitment = preflightCommitment;
}