Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlincecum authored and rileystephens28 committed Oct 22, 2024
1 parent 1ba99e8 commit 41e0967
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/providers/provider-socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ export class SocketBlockSubscriber extends SocketSubscriber {
* @category Providers
*/
export class SocketAccessesSubscriber extends SocketSubscriber {
#logFilter: string;

get logFilter(): EventFilter {
return JSON.parse(this.#logFilter);
}
/**
* Creates a new **SocketBlockSubscriber**.
*
Expand All @@ -198,6 +203,7 @@ export class SocketAccessesSubscriber extends SocketSubscriber {
*/
constructor(provider: SocketProvider, filter: AccessesFilter, zone: Zone) {
super(provider, ['accesses', filter.address], zone);
this.#logFilter = JSON.stringify(filter);
}

/**
Expand All @@ -209,7 +215,7 @@ export class SocketAccessesSubscriber extends SocketSubscriber {
* @returns {Promise<void>}
*/
async _emit(provider: SocketProvider, message: any): Promise<void> {
provider.emit('accesses', this.zone, message);
provider.emit(this.logFilter, this.zone, message);
}
}

Expand Down

0 comments on commit 41e0967

Please sign in to comment.