Skip to content

Commit

Permalink
api: send reduced past state to state
Browse files Browse the repository at this point in the history
  • Loading branch information
sohkai committed May 27, 2019
1 parent 52de752 commit ca42676
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/aragon-api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ export class AppProxy {

return getPastEvents(cachedBlock, pastEventsToBlock).pipe(
mergeScan(wrappedReducer, { ...cachedState, ...initState }, 1),
tap((state) => {
this.cache('state', state)
console.debug('- store - reduced state from past event:', state)
}),
last(),
tap((state) => {
this.cache(CACHED_BLOCK_KEY, pastEventsToBlock)
Expand Down

0 comments on commit ca42676

Please sign in to comment.