While trying to integrate the Schnorr Snap with Metamask, I encountered an issue with the metamask.ts file in the example package. The code was using the wallet_enable method, which is not part of the Snaps JSON-RPC API documentation.
After reviewing the Snaps JSON-RPC API documentation, I found that the correct method to use is wallet_requestSnaps. I updated the metamask.ts file accordingly, and the integration started working as expected.
I recommend updating the example code to use the correct Snaps JSON-RPC API methods, so that others don't encounter the same issue during the integration process.
While trying to integrate the Schnorr Snap with Metamask, I encountered an issue with the metamask.ts file in the example package. The code was using the wallet_enable method, which is not part of the Snaps JSON-RPC API documentation.
After reviewing the Snaps JSON-RPC API documentation, I found that the correct method to use is wallet_requestSnaps. I updated the metamask.ts file accordingly, and the integration started working as expected.
Here's the updated code snippet for reference:
I recommend updating the example code to use the correct Snaps JSON-RPC API methods, so that others don't encounter the same issue during the integration process.