Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "RT3QK/Bl2XW8O93eTzxm4kkhbWU2YLNgl0wIpQtA+Rw=",
"shasum": "tPhKkcndt1BKiNffSxTpxGae+N0L8dqtbsWuMPtgwXY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "xn5ZLnAqlgmHjAQ6k8/otZ3fxZsFXtt+gW4wcGPMkRk=",
"shasum": "34pGPXChz9MhZtvuhbA3mr3iJRRtf5BZuchUOppsFz8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/home-page/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "O1/68sw9rGYH31FRWjjEs2nSWiH3uKJIE/CcWGDylCs=",
"shasum": "phEuQysVh6vKuOES3NkeN22l5/YcycRVdm10adIH7b8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Ov0Ar65MX7lo2uYyp3Ib4ewVnK/HenJye0xb7uTC9E8=",
"shasum": "UrhDVNzx7t2w36ORy5WsywNkZQvHXcR6Sl7jPZRvG4o=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/jsx/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "2yd5MwUprX+3XNKZERiNu6IONA4kAtYIE76fEel23aQ=",
"shasum": "ts/r1Ab8K2GVa0X8oqiDlmiyKlN/fLyBHS+uljXrhhM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "JqzNl7ziMGzb/5CkbdCNzBhcagAdRVo+q7VoLlYNut8=",
"shasum": "5GjC5OYTtXLw1aHztViZ2Xf1dZIgvqP4xCgw4gPT1JY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/send-flow/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "yEqB3AAMpEz6knhYbegfL699DkfGcq+akyyPmSjILSg=",
"shasum": "P0uud2dk/a0PvybjWdaOPXzWlhQkUP4aHlxy8KUu4Wk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/snaps-execution-environments/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Input change events in `onUserInput` now accepts `null` values ([#3722](https://github.com/MetaMask/snaps/pull/3722))

## [10.2.2]

### Changed
Expand Down
4 changes: 4 additions & 0 deletions packages/snaps-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Input change events in `onUserInput` now accepts `null` values ([#3722](https://github.com/MetaMask/snaps/pull/3722))

## [10.0.0]

### Changed
Expand Down
13 changes: 13 additions & 0 deletions packages/snaps-sdk/src/types/handlers/user-input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,17 @@ describe('InputChangeEventStruct', () => {
),
).toBe(true);
});

it('accepts null values', () => {
expect(
is(
{
type: 'InputChangeEvent',
name: 'foo',
value: null,
},
InputChangeEventStruct,
),
).toBe(true);
});
});
14 changes: 8 additions & 6 deletions packages/snaps-sdk/src/types/handlers/user-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@ export const InputChangeEventStruct = assign(
object({
type: literal(UserInputEventType.InputChangeEvent),
name: string(),
value: union([
string(),
boolean(),
AccountSelectorStateStruct,
AssetSelectorStateStruct,
]),
value: nullable(
union([
string(),
boolean(),
AccountSelectorStateStruct,
AssetSelectorStateStruct,
]),
),
}),
);

Expand Down
Loading