Skip to content

Commit f0f5ca6

Browse files
authored
test: re-enable ws test (#4842)
1 parent d19373a commit f0f5ca6

File tree

2 files changed

+6
-5
lines changed
  • packages/hardhat-core

2 files changed

+6
-5
lines changed

packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,11 @@ export class EdrProviderWrapper
650650

651651
private _ethEventListener(event: SubscriptionEvent) {
652652
const subscription = `0x${event.filterId.toString(16)}`;
653-
const result = event.result;
654-
this._emitLegacySubscriptionEvent(subscription, result);
655-
this._emitEip1193SubscriptionEvent(subscription, result);
653+
const results = Array.isArray(event.result) ? event.result : [event.result];
654+
for (const result of results) {
655+
this._emitLegacySubscriptionEvent(subscription, result);
656+
this._emitEip1193SubscriptionEvent(subscription, result);
657+
}
656658
}
657659

658660
private _emitLegacySubscriptionEvent(subscription: string, result: any) {

packages/hardhat-core/test/internal/hardhat-network/provider/modules/eth/websocket.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ describe("Eth module", function () {
381381
return onPending;
382382
});
383383

384-
// TODO: https://github.com/NomicFoundation/edr/issues/279
385-
it.skip("contract events work", async function () {
384+
it("contract events work", async function () {
386385
const signer = await provider.getSigner();
387386
const Factory = new ethers.ContractFactory<[], ethers.Contract>(
388387
EXAMPLE_CONTRACT.abi,

0 commit comments

Comments
 (0)