Skip to content

Commit

Permalink
subgraph: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eladmallel committed Nov 20, 2024
1 parent 47394bd commit 8395db0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/nouns-subgraph/src/stream-escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ export function handleStreamCreated(event: StreamCreated): void {

export function handleStreamFastForwarded(event: StreamFastForwarded): void {
const nounId = event.params.nounId.toString();
const s = getCurrentStream(nounId);

const ff = new StreamFastforward(genericUniqueId(event));
ff.createdTimestamp = event.block.timestamp;
ff.createdBlock = event.block.number;
ff.stream = nounId;
ff.stream = s.id;
ff.ticksToForward = event.params.ticksToForward;
ff.newLastTick = event.params.newLastTick;
ff.save();

const s = getCurrentStream(nounId);
s.lastTick = event.params.newLastTick;
s.streamLengthInTicks = s.streamLengthInTicks - event.params.ticksToForward.toI32();
s.save();
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-subgraph/tests/stream-escrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe('stream-escrow', () => {
'StreamFastforward',
genericUniqueId(ed.txHash, ed.logIndex),
'stream',
ed.nounId.toString(),
streamId,
);
assert.fieldEquals(
'StreamFastforward',
Expand Down

0 comments on commit 8395db0

Please sign in to comment.