Skip to content

Commit

Permalink
convert getDescriptionNode params to object params
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Dec 19, 2024
1 parent 069a8a7 commit 939d897
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import { Box } from '../../component-library';
/**
* Get one or more permission descriptions for a permission name.
*
* @param permission - The permission to render.
* @param index - The index of the permission.
* @param accounts - An array representing list of accounts for which permission is used.
* @param requestedChainIds - An array representing list of chain ids for which permission is used.
* @param options - The options object.
* @param options.permission - The permission to render.
* @param options.index - The index of the permission.
* @param options.accounts - An array representing list of accounts for which permission is used.
* @param options.requestedChainIds - An array representing list of chain ids for which permission is used.
* @returns {JSX.Element} A permission description node.
*/
function getDescriptionNode(permission, index, accounts, requestedChainIds) {
function getDescriptionNode({permission, index, accounts, requestedChainIds}) {
return (
<PermissionCell
permissionName={permission.name}
Expand Down Expand Up @@ -49,12 +50,12 @@ export default function PermissionsConnectPermissionList({
getSubjectName: getSnapName(snapsMetadata),
subjectName,
}).map((permission, index) => {
return getDescriptionNode(
return getDescriptionNode({
permission,
index,
accounts,
requestedChainIds,
);
});
})}
</Box>
);
Expand Down

0 comments on commit 939d897

Please sign in to comment.