Skip to content

Commit

Permalink
Merge pull request #824 from drift-labs/crispheaney/fix-tx-timeout
Browse files Browse the repository at this point in the history
sdk: fix ts timeout
  • Loading branch information
ChesterSim authored Jan 17, 2024
2 parents 06fe92e + adc2618 commit 6baa0b5
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 6baa0b5

Please sign in to comment.