Skip to content

Commit

Permalink
fix: issue 543
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Jul 31, 2024
1 parent 6c943bb commit 13eeb1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,13 @@ export class EdrProviderWrapper
const responseObject: Response = await this._provider.handleRequest(
stringifiedArgs
);
const response = JSON.parse(responseObject.json);

let response;
if (typeof responseObject.data === "string") {

Check failure on line 359 in packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
response = JSON.parse(responseObject.data);

Check failure on line 360 in packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
} else {
response = responseObject.data;

Check failure on line 362 in packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
}

const needsTraces =
this._node._vm.evm.events.eventNames().length > 0 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export function getMinimalEthereumJsVm(
})
);

const response = JSON.parse(responseObject.json);
let response;
if (typeof responseObject.data === "string") {

Check failure on line 86 in packages/hardhat-core/src/internal/hardhat-network/provider/vm/minimal-vm.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
response = JSON.parse(responseObject.data);

Check failure on line 87 in packages/hardhat-core/src/internal/hardhat-network/provider/vm/minimal-vm.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
} else {
response = responseObject.data;

Check failure on line 89 in packages/hardhat-core/src/internal/hardhat-network/provider/vm/minimal-vm.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'data' does not exist on type 'Response'.
}

return Buffer.from(response.result.slice(2), "hex");
},
Expand Down

0 comments on commit 13eeb1d

Please sign in to comment.