Skip to content

Commit fa382b6

Browse files
committed
address comments
1 parent f446985 commit fa382b6

File tree

13 files changed

+24
-59
lines changed

13 files changed

+24
-59
lines changed

packages/examples/packages/browserify-plugin/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snaps.git"
88
},
99
"source": {
10-
"shasum": "DYLBW3jdovQYu6jwACo/3xlujGXb0YxJ19UEpUKX1qE=",
10+
"shasum": "jhSaoXggl7hhgHzX7tkJvz5Ig7tLJFl6RLLD81e1628=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/examples/packages/browserify/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snaps.git"
88
},
99
"source": {
10-
"shasum": "dFTqb94KtIZ44IaoMYhGunl9c9Of9j67TNYobl+CwYg=",
10+
"shasum": "qlJe2g0xM6TBU8vzDMmybMmcKXq20PU0ZEhQwKcajoo=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/examples/packages/settings-page/CHANGELOG.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [1.1.3]
11-
12-
### Fixed
13-
14-
- Bump MetaMask dependencies
15-
16-
## [1.1.2]
17-
18-
### Changed
19-
20-
- Use error wrappers ([#2178](https://github.com/MetaMask/snaps/pull/2178))
21-
22-
## [1.1.1]
23-
24-
### Changed
25-
26-
- Remove snap icon ([#2189](https://github.com/MetaMask/snaps/pull/2189))
27-
28-
## [1.1.0]
29-
30-
### Changed
31-
32-
- Use `@metamask/snaps-sdk` package ([#1946](https://github.com/MetaMask/snaps/pull/1946), [#1954](https://github.com/MetaMask/snaps/pull/1954))
33-
- This package replaces the `@metamask/snaps-types` and
34-
- `@metamask/snaps-ui` packages, and is much more lightweight.
35-
36-
## [1.0.0]
37-
38-
### Added
39-
40-
- Initial release ([#1918](https://github.com/MetaMask/snaps/pull/1918))
41-
42-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/[email protected]
43-
[1.1.3]: https://github.com/MetaMask/snaps/compare/@metamask/[email protected]...@metamask/[email protected]
44-
[1.1.2]: https://github.com/MetaMask/snaps/compare/@metamask/[email protected]...@metamask/[email protected]
45-
[1.1.1]: https://github.com/MetaMask/snaps/compare/@metamask/[email protected]...@metamask/[email protected]
46-
[1.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/[email protected]...@metamask/[email protected]
47-
[1.0.0]: https://github.com/MetaMask/snaps/releases/tag/@metamask/[email protected]
10+
[Unreleased]: https://github.com/MetaMask/snaps/

packages/examples/packages/settings-page/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
This snap demonstrates how to use `endowment:page-settings` permission to show
44
a settings page that leverages custom UI components.
55

6+
This endowment is initially restricted to preinstalled snaps only.
7+
68
## Snap manifest
79

810
The manifest of this snap includes the `endowment:page-settings` permission:

packages/examples/packages/settings-page/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/settings-page-example-snap",
3-
"version": "1.1.3",
3+
"version": "0.0.0",
44
"description": "MetaMask example snap demonstrating the use of settings pages",
55
"keywords": [
66
"MetaMask",
@@ -25,8 +25,8 @@
2525
"scripts": {
2626
"build": "mm-snap build",
2727
"build:clean": "yarn clean && yarn build",
28-
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/home-page-example-snap",
29-
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/home-page-example-snap",
28+
"changelog:update": "../../../../scripts/update-changelog.sh @metamask/settings-page-example-snap",
29+
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/settings-page-example-snap",
3030
"clean": "rimraf \"dist\"",
3131
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies",
3232
"lint:ci": "yarn lint",

packages/examples/packages/settings-page/snap.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"version": "1.1.3",
2+
"version": "0.0.0",
33
"description": "MetaMask example snap demonstrating the use of settings pages.",
44
"proposedName": "Settings Page Example Snap",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/MetaMask/snaps.git"
88
},
99
"source": {
10-
"shasum": "1EtjSOu6ZrLaiCRMQo03YWHnXKsjDV0bIyS0mhiImpw=",
10+
"shasum": "yWcDv7XuV/FGRxKdOMkelR4qB0Ivel7oP9fEuNz0EE8=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"branches": 80.68,
33
"functions": 89.26,
4-
"lines": 90.67,
5-
"statements": 90.06
4+
"lines": 90.66,
5+
"statements": 90.05
66
}

packages/snaps-utils/coverage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"branches": 99.74,
33
"functions": 98.93,
44
"lines": 99.46,
5-
"statements": 96.18
5+
"statements": 96.25
66
}

packages/snaps-utils/src/handlers.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,20 @@ export const OnTransactionResponseStruct = nullable(
140140

141141
export const OnSignatureResponseStruct = OnTransactionResponseStruct;
142142

143-
export const OnPageResponseWithContentStruct = object({
143+
export const OnHomePageResponseWithContentStruct = object({
144144
content: ComponentOrElementStruct,
145145
});
146146

147-
export const OnPageResponseWithIdStruct = object({
147+
export const OnHomePageResponseWithIdStruct = object({
148148
id: string(),
149149
});
150150

151-
export const OnPageResponseStruct = union([
152-
OnPageResponseWithContentStruct,
153-
OnPageResponseWithIdStruct,
151+
export const OnHomePageResponseStruct = union([
152+
OnHomePageResponseWithContentStruct,
153+
OnHomePageResponseWithIdStruct,
154154
]);
155155

156-
export const OnHomePageResponseStruct = OnPageResponseStruct;
157-
158-
export const OnSettingsPageResponseStruct = OnPageResponseStruct;
156+
export const OnSettingsPageResponseStruct = OnHomePageResponseStruct;
159157

160158
export const AddressResolutionStruct = object({
161159
protocol: string(),

packages/test-snaps/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@metamask/notification-example-snap": "workspace:^",
6767
"@metamask/preinstalled-example-snap": "workspace:^",
6868
"@metamask/send-flow-example-snap": "workspace:^",
69+
"@metamask/settings-page-example-snap": "workspace:^",
6970
"@metamask/signature-insights-example-snap": "workspace:^",
7071
"@metamask/snaps-utils": "workspace:^",
7172
"@metamask/utils": "^10.0.0",

0 commit comments

Comments
 (0)