UNPKG

@metamask/snaps-simulation

Version:

A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment

23 lines 899 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNetworkVersionHandler = void 0; /** * A mock handler for net_version that always returns a specific * hardcoded result. * * @param _request - Incoming JSON-RPC request. Ignored for this specific * handler. * @param response - The outgoing JSON-RPC response, modified to return the * result. * @param _next - The `json-rpc-engine` middleware next handler. * @param end - The `json-rpc-engine` middleware end handler. * @returns The JSON-RPC response. */ async function getNetworkVersionHandler(_request, response, _next, end) { // For now this will return a mocked result, this should probably match // whatever network the simulation is using. response.result = '1'; return end(); } exports.getNetworkVersionHandler = getNetworkVersionHandler; //# sourceMappingURL=net-version.cjs.map