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
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

- Add missing `includeMarketData` param to `onAssetsConversion` handler ([#3323](https://github.com/MetaMask/snaps/pull/3323))

## [7.2.0]

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ describe('getHandlerArguments', () => {
).toThrow('Invalid request params');
});

it('validates the request params for the OnAssetsConversion handler', () => {
expect(() =>
getHandlerArguments(MOCK_ORIGIN, HandlerType.OnAssetsConversion, {
id: 1,
jsonrpc: '2.0',
method: 'foo',
params: {},
}),
).toThrow('Invalid request params');
});

it('validates the request params for the OnAssetsLookup handler', () => {
expect(() =>
getHandlerArguments(MOCK_ORIGIN, HandlerType.OnAssetsLookup, {
id: 1,
jsonrpc: '2.0',
method: 'foo',
params: {},
}),
).toThrow('Invalid request params');
});

it('validates the request params for the OnAssetHistoricalPrice handler', () => {
expect(() =>
getHandlerArguments(MOCK_ORIGIN, HandlerType.OnAssetHistoricalPrice, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export function getHandlerArguments(
}
case HandlerType.OnAssetsConversion: {
assertIsOnAssetsConversionRequestArguments(request.params);
const { conversions } = request.params;
return { conversions };
const { conversions, includeMarketData } = request.params;
return { conversions, includeMarketData };
}
case HandlerType.OnNameLookup: {
assertIsOnNameLookupRequestArguments(request.params);
Expand Down
Loading