Skip to content

Commit

Permalink
Merge branch 'main' into dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer committed Feb 29, 2024
2 parents 2aef64d + 572b515 commit be3d9cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/eventstream-proxy/eventstream-proxy.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ export abstract class EventStreamProxyBase extends WebSocketEventsBase {
client.on('message', async (message: string) => {
const action = JSON.parse(message) as WebSocketActionBase;
switch (action.type) {
case 'start':
case 'start': {
const startAction = action as WebSocketStart;
this.startListening(client, startAction.namespace);
break;
case 'ack':
}
case 'ack': {
const ackAction = action as WebSocketAck;
this.handleAck(client, ackAction);
}
}
});
}
Expand Down
3 changes: 0 additions & 3 deletions src/tokens/tokens.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,11 @@ export class TokensService {
this.instancePath = instancePath;
this.topic = topic;
this.contractAddress = contractAddress.toLowerCase();
this.proxy.addConnectionListener(this);
this.proxy.addEventListener(new TokenListener(this.blockchain));
const wsUrl = new URL('/ws', this.baseUrl.replace('http', 'ws')).href;
this.proxy.configure(wsUrl, this.topic);
}

async onConnect() {}

private async createPoolSubscription(
ctx: Context,
namespace: string,
Expand Down

0 comments on commit be3d9cc

Please sign in to comment.