@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
17 lines • 622 B
JavaScript
/**
* A mock handler for the `wallet_switchEthereumChain` method that always
* returns `null`.
*
* @param _request - Incoming JSON-RPC request. This is 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 response.
*/
export async function getSwitchEthereumChainHandler(_request, response, _next, end) {
response.result = null;
return end();
}
//# sourceMappingURL=switch-ethereum-chain.mjs.map