From 642ce91b70d38268e814feaf6448e0729d26f96b Mon Sep 17 00:00:00 2001 From: David Drazic Date: Fri, 10 Mar 2023 12:38:58 +0100 Subject: [PATCH] [FLASK] Add WebAssembly endowment (#17694) * Add WebAssembly endowment Update message and fix lint Update fa icon * Remove duplicated webassembly permission from a list --- app/_locales/en/messages.json | 4 ++++ ui/helpers/utils/permission.js | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 772a593dd..5014ead60 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2822,6 +2822,10 @@ "message": "View your public key for $1.", "description": "The description for the `snap_getBip32PublicKey` permission. $1 is a name for the derivation path, e.g., 'Ethereum accounts'." }, + "permission_webAssembly": { + "message": "Support for WebAssembly.", + "description": "The description of the `endowment:webassembly` permission." + }, "permissions": { "message": "Permissions" }, diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js index f17461fa0..763dddc1a 100644 --- a/ui/helpers/utils/permission.js +++ b/ui/helpers/utils/permission.js @@ -171,6 +171,12 @@ const PERMISSION_DESCRIPTIONS = deepFreeze({ rightIcon: null, weight: 2, }), + [EndowmentPermissions['endowment:webassembly']]: (t) => ({ + label: t('permission_webAssembly'), + leftIcon: 'fas fa-microchip', + rightIcon: null, + weight: 2, + }), [EndowmentPermissions['endowment:long-running']]: (t) => ({ label: t('permission_longRunning'), leftIcon: 'fas fa-infinity',