Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #38 from paritytech/am-fix-every-block
Browse files Browse the repository at this point in the history
Fix on every block
  • Loading branch information
axelchalon committed Nov 8, 2018
2 parents faeb5d0 + 2620e72 commit 275f63f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/light.js/package.json
@@ -1,7 +1,7 @@
{
"name": "@parity/light.js",
"description": "A high-level reactive JS library optimized for light clients",
"version": "1.0.8",
"version": "1.0.9",
"author": "Parity Team <admin@parity.io>",
"license": "MIT",
"repository": "https://github.com/paritytech/js-libs/tree/master/packages/light.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/light.js/src/frequency/blocks.ts
Expand Up @@ -20,10 +20,10 @@ import { onSyncingChanged$ } from './health';
*/
const onEveryBlockWithApi$ = memoizee(
(api: any, options: FrequencyObservableOptions) =>
onSyncingChanged$(options).pipe(
filter((isSyncing: boolean) => isSyncing === false),
withLatestFrom(createPubsubObservable('eth_blockNumber', options)),
map(([_, blockNumber]) => blockNumber)
createPubsubObservable('eth_blockNumber', options).pipe(
withLatestFrom(onSyncingChanged$(options)),
filter(([_, isSyncing]) => isSyncing === false),
map(([blockNumber]) => blockNumber)
) as Observable<BigNumber>,
{ length: 1 } // Only memoize by api
);
Expand Down

0 comments on commit 275f63f

Please sign in to comment.