Skip to content

Commit

Permalink
Fix bug in stream state view holding on to unnecessary memory (#2324)
Browse files Browse the repository at this point in the history
I need the signatures, i accidentally left in the whole event, which
doubles our memory usage in browser.
  • Loading branch information
texuf authored Feb 10, 2025
1 parent a55507b commit 3f71129
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/sdk/src/streamStateView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,11 @@ export class StreamStateView implements IStreamStateView {
this.signatures.set(timelineEvent.hashStr, {
hash: timelineEvent.remoteEvent.hash,
signature: timelineEvent.remoteEvent.signature,
event: timelineEvent.remoteEvent.event,
event: {
creatorAddress: timelineEvent.remoteEvent.event.creatorAddress,
delegateSig: timelineEvent.remoteEvent.event.delegateSig,
delegateExpiryEpochMs: timelineEvent.remoteEvent.event.delegateExpiryEpochMs,
},
})
} else {
this.events.set(timelineEvent.hashStr, timelineEvent)
Expand Down

0 comments on commit 3f71129

Please sign in to comment.