Skip to content

Commit

Permalink
sdk: fix ts timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 17, 2024
1 parent bc18f93 commit adc2618
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions sdk/src/tx/retryTxSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,16 @@ export class RetryTxSender extends BaseTxSender {
}
})();

const result = await this.confirmTransaction(txid, opts.commitment);
const slot = result.context.slot;
stopWaiting();
let slot: number;
try {
const result = await this.confirmTransaction(txid, opts.commitment);
slot = result.context.slot;
// eslint-disable-next-line no-useless-catch
} catch (e) {
throw e;
} finally {
stopWaiting();
}

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

0 comments on commit adc2618

Please sign in to comment.