diff --git a/ui/components/app/flask/update-snap-permission-list/update-snap-permission-list.js b/ui/components/app/flask/update-snap-permission-list/update-snap-permission-list.js
index 3ecfa91c7..105574d1d 100644
--- a/ui/components/app/flask/update-snap-permission-list/update-snap-permission-list.js
+++ b/ui/components/app/flask/update-snap-permission-list/update-snap-permission-list.js
@@ -14,77 +14,89 @@ export default function UpdateSnapPermissionList({
const t = useI18nContext();
const ApprovedPermissions = () => {
- return Object.keys(approvedPermissions).map((approvedPermission) => {
- const { label, rightIcon } = getPermissionDescription(
- t,
- approvedPermission,
- );
- const { date } = approvedPermissions[approvedPermission];
- const formattedDate = formatDate(date, 'yyyy-MM-dd');
- return (
-
-
-
- {label}
-
- {t('approvedOn', [formattedDate])}
-
+ return Object.entries(approvedPermissions).map(
+ ([permissionName, permissionValue]) => {
+ const { label, rightIcon } = getPermissionDescription(
+ t,
+ permissionName,
+ permissionValue,
+ );
+ const { date } = permissionValue;
+ const formattedDate = formatDate(date, 'yyyy-MM-dd');
+ return (
+
+
+
+ {label}
+
+ {t('approvedOn', [formattedDate])}
+
+
+ {rightIcon &&
}
- {rightIcon &&
}
-
- );
- });
+ );
+ },
+ );
};
const RevokedPermissions = () => {
- return Object.keys(revokedPermissions).map((revokedPermission) => {
- const { label, rightIcon } = getPermissionDescription(
- t,
- revokedPermission,
- );
- return (
-
-
-
- {label}
-
- {t('permissionRevoked')}
-
+ return Object.entries(revokedPermissions).map(
+ ([permissionName, permissionValue]) => {
+ const { label, rightIcon } = getPermissionDescription(
+ t,
+ permissionName,
+ permissionValue,
+ );
+ return (
+
+
+
+ {label}
+
+ {t('permissionRevoked')}
+
+
+ {rightIcon &&
}
- {rightIcon &&
}
-
- );
- });
+ );
+ },
+ );
};
const NewPermissions = () => {
- return Object.keys(newPermissions).map((newPermission) => {
- const { label, rightIcon } = getPermissionDescription(t, newPermission);
- return (
-
-
-
- {label}
-
- {t('permissionRequested')}
-
+ return Object.entries(newPermissions).map(
+ ([permissionName, permissionValue]) => {
+ const { label, rightIcon } = getPermissionDescription(
+ t,
+ permissionName,
+ permissionValue,
+ );
+ return (
+
+
+
+ {label}
+
+ {t('permissionRequested')}
+
+
+ {rightIcon &&
}
- {rightIcon &&
}
-
- );
- });
+ );
+ },
+ );
};
return (