diff --git a/packages/nouns-subgraph/src/stream-escrow.ts b/packages/nouns-subgraph/src/stream-escrow.ts index f049f2e2d..80b8e62c0 100644 --- a/packages/nouns-subgraph/src/stream-escrow.ts +++ b/packages/nouns-subgraph/src/stream-escrow.ts @@ -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(); diff --git a/packages/nouns-subgraph/tests/stream-escrow.test.ts b/packages/nouns-subgraph/tests/stream-escrow.test.ts index 6ede61765..804ee5940 100644 --- a/packages/nouns-subgraph/tests/stream-escrow.test.ts +++ b/packages/nouns-subgraph/tests/stream-escrow.test.ts @@ -227,7 +227,7 @@ describe('stream-escrow', () => { 'StreamFastforward', genericUniqueId(ed.txHash, ed.logIndex), 'stream', - ed.nounId.toString(), + streamId, ); assert.fieldEquals( 'StreamFastforward',