Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG -- [fcl-core] Reduce Transaction Status Polling Delay to 1000ms #1989

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading