From 67db2d5632fe702acbb4f534bbe2419d663120a2 Mon Sep 17 00:00:00 2001 From: Jakub Zajkowski Date: Mon, 24 Jun 2024 13:12:50 +0200 Subject: [PATCH] Updated event names in SSE client part --- src/services/EventStream.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/services/EventStream.ts b/src/services/EventStream.ts index df97da8cc..bb3ca6b03 100644 --- a/src/services/EventStream.ts +++ b/src/services/EventStream.ts @@ -34,8 +34,8 @@ export class DeployWatcher { } start() { - this.es.subscribe(EventName.DeployProcessed, result => { - const deployHash = result.body.DeployProcessed.deploy_hash; + this.es.subscribe(EventName.TransactionProcessed, result => { + const deployHash = result.body.TransactionProcessed.deploy_hash; const pendingDeploy = this.watchList.find( d => d.deployHash === deployHash ); @@ -55,14 +55,11 @@ export class DeployWatcher { type EventHandlerFn = (result: any) => void; export enum EventName { - /** Can be fetched in `/events/main` path */ BlockAdded = 'BlockAdded', - /** Can be fetched in `/events/main` path */ - DeployProcessed = 'DeployProcessed', - /** Can be fetched in `/events/deploys` path */ - DeployAccepted = 'DeployAccepted', + TransactionProcessed = 'TransactionProcessed', + TransactionAccepted = 'TransactionAccepted', + TransactionExpired = 'TransactionExpired', BlockFinalized = 'BlockFinalized', - /** Can be fetched in `/events/sigs` path */ FinalitySignature = 'FinalitySignature', Fault = 'Fault' }