- {Object.keys(permissions).map((permission) => {
- const { label, leftIcon, rightIcon } = getPermissionDescription(
- t,
- permission,
- );
-
- return (
-
-
- {label}
- {rightIcon && }
-
- );
- })}
+ {Object.entries(permissions).reduce(
+ (target, [permissionName, permissionValue]) =>
+ target.concat(
+ getDescriptionNodes(t, permissionName, permissionValue),
+ ),
+ [],
+ )}
);
}
diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js
index 518df80ad..b03772b2b 100644
--- a/ui/helpers/utils/permission.js
+++ b/ui/helpers/utils/permission.js
@@ -1,4 +1,7 @@
import deepFreeze from 'deep-freeze-strict';
+///: BEGIN:ONLY_INCLUDE_IN(flask)
+import React from 'react';
+///: END:ONLY_INCLUDE_IN
import {
RestrictedMethods,
///: BEGIN:ONLY_INCLUDE_IN(flask)
@@ -29,6 +32,20 @@ const PERMISSION_DESCRIPTIONS = deepFreeze({
label: (t) => t('permission_notifications'),
rightIcon: null,
},
+ [RestrictedMethods.snap_getBip32Entropy]: {
+ label: (t, _, permissionValue) => {
+ return permissionValue.caveats[0].value.map(({ path, curve }) =>
+ t('permission_manageBip32Keys', [
+