Skip to content

Commit

Permalink
chore: do not send hardhat_setLedgerOutputEnabled over http
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Aug 6, 2024
1 parent 83721d9 commit dbe99af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/hardhat-core/src/internal/core/providers/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
}

public async request(args: RequestArguments): Promise<unknown> {
if (args.method === "hardhat_setLedgerOutputEnabled") {
const error = new ProviderError(
"hardhat_setLedgerOutputEnabled - Method not supported",
-32004
);
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
throw error;
}

const jsonRpcRequest = this._getJsonRpcRequest(
args.method,
args.params as any[]
Expand Down

0 comments on commit dbe99af

Please sign in to comment.