Skip to content

Commit

Permalink
Updated event names in SSE client part
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Zajkowski committed Jun 24, 2024
1 parent 21deef7 commit 284b1ef
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/services/EventStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand All @@ -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'
}
Expand Down

0 comments on commit 284b1ef

Please sign in to comment.