Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Jan 10, 2024
1 parent 822ce73 commit 30c8547
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions sdk/src/tx/retryTxSender.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ConfirmationStrategy, TxSigAndSlot } from './types';
import {
ConfirmOptions,
TransactionSignature,
Connection,
} from '@solana/web3.js';
import { AnchorProvider } from '@coral-xyz/anchor';
Expand Down Expand Up @@ -70,13 +69,8 @@ export class RetryTxSender extends BaseTxSender {
): Promise<TxSigAndSlot> {
const startTime = this.getTimestamp();

let txid: TransactionSignature;
try {
txid = await this.connection.sendRawTransaction(rawTransaction, opts);
this.sendToAdditionalConnections(rawTransaction, opts);
} catch (e) {
throw e;
}
const txid = await this.connection.sendRawTransaction(rawTransaction, opts);
this.sendToAdditionalConnections(rawTransaction, opts);

let done = false;
const resolveReference: ResolveReference = {
Expand Down Expand Up @@ -104,15 +98,8 @@ export class RetryTxSender extends BaseTxSender {
}
})();

let slot: number;
try {
const result = await this.confirmTransaction(txid, opts.commitment);
slot = result.context.slot;
} catch (e) {
throw e;
} finally {
stopWaiting();
}
const result = await this.confirmTransaction(txid, opts.commitment);
const slot = result.context.slot;

return { txSig: txid, slot };
}
Expand Down

0 comments on commit 30c8547

Please sign in to comment.