diff --git a/index.html b/index.html
index 0f5eaa7..5cc31e4 100644
--- a/index.html
+++ b/index.html
@@ -1,8 +1,8 @@
-
+
Hello, Snaps!
-
+
@@ -14,15 +14,18 @@ Hello, Snaps!
Please note that:
- The snap.manifest.json and package.json must be located in the server root directory..
+ The snap.manifest.json and
+ package.json must be located in the server root
+ directory..
- The Snap bundle must be hosted at the location specified by the location field of snap.manifest.json.
+ The Snap bundle must be hosted at the location specified by the
+ location field of snap.manifest.json.
-
+
Connect
Send Hello
@@ -31,34 +34,40 @@ Hello, Snaps!
diff --git a/snap.manifest.json b/snap.manifest.json
index 88eeec9..fe38285 100644
--- a/snap.manifest.json
+++ b/snap.manifest.json
@@ -1,13 +1,13 @@
{
"version": "0.7.0",
- "proposedName": "MetaMask Template Snap",
"description": "A MetaMask Snap template.",
+ "proposedName": "MetaMask Template Snap",
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/snap-template.git"
},
"source": {
- "shasum": "W4FN/2A1mQSjjrO95MGptw7pr+UR8913AOIksoajQSo=",
+ "shasum": "szkOOEsBYIKpPnglTb+pEMXXoW1tKoZOjLTGgr3aJ8I=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
@@ -18,7 +18,11 @@
}
},
"initialPermissions": {
- "snap_confirm": {}
+ "snap_confirm": {},
+ "endowment:rpc": {
+ "dapps": true,
+ "snaps": false
+ }
},
"manifestVersion": "0.1"
}
diff --git a/src/index.js b/src/index.js
index a692534..52a974a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,7 +1,7 @@
module.exports.onRpcRequest = async ({ origin, request }) => {
switch (request.method) {
case 'hello':
- return wallet.request({
+ return snap.request({
method: 'snap_confirm',
params: [
{