Skip to content

Commit 2edf6ef

Browse files
committed
Use cts.Token for delay in transaction polling
Replaces usage of cancellationToken with cts.Token in delay calls within transaction receipt polling loops in both ThirdwebTransaction.cs and Utils.cs. This ensures consistent cancellation behavior aligned with the controlling CancellationTokenSource.
1 parent 018ec19 commit 2edf6ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Thirdweb/Thirdweb.Transactions/ThirdwebTransaction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public static async Task<ThirdwebTransactionReceipt> WaitForTransactionReceipt(T
422422
receipt = await rpc.SendRequestAsync<ThirdwebTransactionReceipt>("eth_getTransactionReceipt", txHash).ConfigureAwait(false);
423423
if (receipt == null)
424424
{
425-
await ThirdwebTask.Delay(100, cancellationToken).ConfigureAwait(false);
425+
await ThirdwebTask.Delay(100, cts.Token).ConfigureAwait(false);
426426
}
427427
} while (receipt == null && !cts.Token.IsCancellationRequested);
428428

Thirdweb/Thirdweb.Utils/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ public static async Task<ThirdwebTransactionReceipt> WaitForTransactionReceipt(T
11761176
receipt = await rpc.SendRequestAsync<ThirdwebTransactionReceipt>("eth_getTransactionReceipt", txHash).ConfigureAwait(false);
11771177
if (receipt == null)
11781178
{
1179-
await ThirdwebTask.Delay(100, cancellationToken).ConfigureAwait(false);
1179+
await ThirdwebTask.Delay(100, cts.Token).ConfigureAwait(false);
11801180
}
11811181
} while (receipt == null && !cts.Token.IsCancellationRequested);
11821182

0 commit comments

Comments
 (0)