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/chain-agnostic-permission/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]

### Changed

- Add return type annotation to `getCaip25PermissionFromLegacyPermissions` to make its return output assignable to `RequestedPermissions` ([#6382](https://github.com/MetaMask/core/pull/6382))

## [1.1.1]

### Changed
Expand Down
9 changes: 8 additions & 1 deletion packages/chain-agnostic-permission/src/caip25Permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,14 @@ export const getCaip25PermissionFromLegacyPermissions =
value: Hex[];
}[];
};
}) => {
}): {
[Caip25EndowmentPermissionName]: {
caveats: NonEmptyArray<{
type: typeof Caip25CaveatType;
value: typeof caveatValueWithAccountsAndChains;
}>;
};
} => {
const permissions = pick(requestedPermissions, [
PermissionKeys.eth_accounts,
PermissionKeys.permittedChains,
Expand Down
Loading