Skip to content

Commit

Permalink
Fixed FallbackProvider sync-stalling for backends (#841).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 21, 2020
1 parent 8516076 commit f963589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/providers/src.ts/fallback-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async function waitForSync(config: RunningConfig, blockNumber: number): Promise<
setTimeout(function() {

// We are synced
if (provider.blockNumber >= blockNumber) { return resolve(Provider); }
if (provider.blockNumber >= blockNumber) { return resolve(provider); }

// We're done; just quit
if (config.cancelled) { return resolve(null); }
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export function fetchJson(connection: string | ConnectionInfo, json?: string, pr
return Promise.race([ runningTimeout.promise, runningFetch ]);
}

export function poll(func: () => Promise<any>, options?: PollOptions): Promise<any> {
export function poll<T>(func: () => Promise<T>, options?: PollOptions): Promise<T> {
if (!options) { options = {}; }
options = shallowCopy(options);
if (options.floor == null) { options.floor = 0; }
Expand Down

0 comments on commit f963589

Please sign in to comment.