From 86fea05e906a62fcd01b1b72ef73e2607b95ec19 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Fri, 25 Aug 2023 01:29:44 -0400 Subject: [PATCH 1/2] Update snaps publishing documentation - fixes #643 1. Clarify the requirements for the icon 2. Call out that only the snap package should be published when using the template. 3. Mention how to use the Simulator to test it. --- snaps/how-to/develop-a-snap.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/snaps/how-to/develop-a-snap.md b/snaps/how-to/develop-a-snap.md index 4094327fd95..9ba61101a1c 100644 --- a/snaps/how-to/develop-a-snap.md +++ b/snaps/how-to/develop-a-snap.md @@ -88,9 +88,18 @@ The following details are specific to Snaps: - The version in `package.json` and `snap.manifest.json` must match. - The image specified in `iconPath` in the manifest file is used as the icon displayed when installing and displaying confirmations from the snap. + - This icon must be a valid SVG. + - The icon will be cropped in a circle when displayed in MetaMask; you do not need to make the icon circular. After publishing the snap, any dapp can connect to the snap by using the snap ID `npm:[packageName]`. +:::caution +If you are using the snap template, make sure to only publish the snap package in `/packages/snap`. +You can use the [Snaps Simulator](https://metamask.github.io/snaps/snaps-simulator/staging/#/manifest) to verify +that your snap was published correctly — just click on "localhost" in the top right corner and change the +snap location to be "npm" and the ID of your snap. +::: + ## Distribute your snap Since snaps are currently intended for a developer audience, MetaMask doesn't currently facilitate From 7b04d50758920b13a1abb13a41cc5fc66eecc006 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Fri, 25 Aug 2023 01:32:31 -0400 Subject: [PATCH 2/2] Update develop-a-snap.md Clarify all surfaces for snap icon --- snaps/how-to/develop-a-snap.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snaps/how-to/develop-a-snap.md b/snaps/how-to/develop-a-snap.md index 9ba61101a1c..7528f6ec1c5 100644 --- a/snaps/how-to/develop-a-snap.md +++ b/snaps/how-to/develop-a-snap.md @@ -86,8 +86,7 @@ on publishing to the public registry. The following details are specific to Snaps: - The version in `package.json` and `snap.manifest.json` must match. -- The image specified in `iconPath` in the manifest file is used as the icon displayed when - installing and displaying confirmations from the snap. +- The image specified in `iconPath` in the manifest file is used as the icon displayed when installing the snap, in custom dialogs, and in the settings menu. - This icon must be a valid SVG. - The icon will be cropped in a circle when displayed in MetaMask; you do not need to make the icon circular.