@@ -40,12 +40,11 @@ export function handleStreamUpdate(event: StreamUpdated): void {
4040 if ( stream === null ) {
4141 // If the stream was initialized using the trustedSetStreamMetadata() method instead of the usual createStream(),
4242 // the Stream entity does not yet exist. This pattern was used at least in the brubeck-migration-script
43- // (see: https://polygonscan.com/tx/0x8b3f4eee260cab5b7eed2f90f09db14f35d96bf231368df44988b3035b41a543),
44- // and possibly in ENS stream creation as well (see: https://github.com/streamr-dev/network-contracts/pull/109).
45- // The trustedSetStreamMetadata() method, which existed in StreamRegistry before version 5,
46- // only emitted a StreamUpdated event. Since no StreamCreated event was triggered during this process,
47- // the handleStreamCreation() function was never called, and the Stream entity wasn't created.
48- // Therefore, we need to create it here manually.
43+ // (see https://github.com/streamr-dev/network-contracts/pull/1007), and possibly also in ENS stream creation
44+ // (see https://github.com/streamr-dev/network-contracts/pull/109).
45+ // The trustedSetStreamMetadata() method, which existed in StreamRegistry before version 5, only emitted
46+ // the StreamUpdated event. Since no StreamCreated event was triggered during this process, the handleStreamCreation()
47+ // function was not called, and therefore the Stream entity wasn't created. For this reason we need to create it here.
4948 stream = new Stream ( event . params . id )
5049 stream . idAsString = event . params . id
5150 stream . createdAt = event . block . timestamp
0 commit comments