Skip to content

Commit

Permalink
Add typeName & chain
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Oct 2, 2023
1 parent b8441d8 commit f3c33d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export async function action(options: WebhookRunOptions) {
});

// Stream Blocks
emitter.on("anyMessage", async (data, cursor, clock) => {
emitter.on("output", async (data, cursor, clock) => {
if (!clock.timestamp) return;
const chain = new URL(options.substreamsEndpoint).hostname.split(".")[0];
const metadata = {
cursor,
session: {
Expand All @@ -45,7 +46,9 @@ export async function action(options: WebhookRunOptions) {
manifest: {
substreamsEndpoint: options.substreamsEndpoint,
moduleName: options.moduleName,
type: data.getType().typeName,
moduleHash,
chain
},
}
// Sign body
Expand Down

0 comments on commit f3c33d5

Please sign in to comment.