We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32f3033 commit 7496f75Copy full SHA for 7496f75
src/clients/createClient.ts
@@ -224,8 +224,12 @@ export function createClient(parameters: ClientConfig): Client {
224
} = parameters
225
226
const blockTime = chain?.blockTime ?? 12_000
227
- const pollingInterval =
228
- parameters.pollingInterval ?? Math.floor(blockTime / 3)
+
+ const defaultPollingInterval = Math.min(
229
+ Math.max(Math.floor(blockTime / 2), 500),
230
+ 4_000,
231
+ )
232
+ const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval
233
const cacheTime = parameters.cacheTime ?? pollingInterval
234
235
const account = parameters.account
0 commit comments