Skip to content

Commit

Permalink
Reduce Transaction Status Polling Delay to 1000ms (#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Oct 24, 2024
1 parent 5f0bc36 commit 8a5f8e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-actors-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@onflow/fcl-core": minor
---

Reduce transaction status polling delay to 1000ms
4 changes: 2 additions & 2 deletions packages/fcl-core/src/transaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const spawnTransaction =
*
* @param {string} transactionId - The transaction ID
* @param {object} [opts] - Optional parameters
* @param {number} [opts.pollRate=2500] - Polling rate in milliseconds
* @param {number} [opts.pollRate=1000] - Polling rate in milliseconds
* @param {number} [opts.txNotFoundTimeout=12500] - Timeout in milliseconds for ignoring transaction not found errors (do not modify unless you know what you are doing)
* @returns {{
* snapshot: function(): Promise<TransactionStatus>,
Expand All @@ -131,7 +131,7 @@ const spawnTransaction =
*/
export function transaction(
transactionId,
opts = {txNotFoundTimeout: 12500, pollRate: 2500}
opts = {txNotFoundTimeout: 12500, pollRate: 1000}
) {
// Validate transactionId as 64 byte hash
if (!TXID_REGEXP.test(scoped(transactionId)))
Expand Down

0 comments on commit 8a5f8e9

Please sign in to comment.