Skip to content

Commit 7b7be0d

Browse files
committed
Fix JsonRpcProvider ignoring pollingInterval in options (#4644).
1 parent b553b1b commit 7b7be0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src.ts/providers/provider-jsonrpc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,10 @@ export abstract class JsonRpcApiPollingProvider extends JsonRpcApiProvider {
11621162
constructor(network?: Networkish, options?: JsonRpcApiProviderOptions) {
11631163
super(network, options);
11641164

1165-
this.#pollingInterval = 4000;
1165+
let pollingInterval = this._getOption("pollingInterval");
1166+
if (pollingInterval == null) { pollingInterval = defaultOptions.pollingInterval; }
1167+
1168+
this.#pollingInterval = pollingInterval;
11661169
}
11671170

11681171
_getSubscriber(sub: Subscription): Subscriber {

0 commit comments

Comments
 (0)