From adc2618096bfbe59da70c68f023ee2dd30cb5e8d Mon Sep 17 00:00:00 2001 From: Chris Heaney Date: Wed, 17 Jan 2024 09:02:01 -0500 Subject: [PATCH] sdk: fix ts timeout --- sdk/src/tx/retryTxSender.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sdk/src/tx/retryTxSender.ts b/sdk/src/tx/retryTxSender.ts index 92a8b9923..bbd858aeb 100644 --- a/sdk/src/tx/retryTxSender.ts +++ b/sdk/src/tx/retryTxSender.ts @@ -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 }; }