diff --git a/.changeset/odd-actors-ring.md b/.changeset/odd-actors-ring.md new file mode 100644 index 000000000..22c7a3a51 --- /dev/null +++ b/.changeset/odd-actors-ring.md @@ -0,0 +1,5 @@ +--- +"@onflow/fcl-core": minor +--- + +Reduce transaction status polling delay to 1000ms diff --git a/packages/fcl-core/src/transaction/index.js b/packages/fcl-core/src/transaction/index.js index 34d4530dd..bc4ca7b74 100644 --- a/packages/fcl-core/src/transaction/index.js +++ b/packages/fcl-core/src/transaction/index.js @@ -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, @@ -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)))