UNPKG

@metamask/snaps-simulation

Version:

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

19 lines 725 B
/** * 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. */ export 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(); } //# sourceMappingURL=net-version.mjs.map