From db3a1a3a854fc61089f2558d0ff2f7d6b0a5d80c Mon Sep 17 00:00:00 2001 From: david0xd Date: Tue, 19 Sep 2023 12:38:52 +0200 Subject: [PATCH] Remove long-running Snap permission --- app/_locales/de/messages.json | 8 -------- app/_locales/el/messages.json | 8 -------- app/_locales/en/messages.json | 8 -------- app/_locales/es/messages.json | 8 -------- app/_locales/fr/messages.json | 8 -------- app/_locales/hi/messages.json | 8 -------- app/_locales/id/messages.json | 8 -------- app/_locales/ja/messages.json | 8 -------- app/_locales/ko/messages.json | 8 -------- app/_locales/pt/messages.json | 8 -------- app/_locales/ru/messages.json | 8 -------- app/_locales/tl/messages.json | 8 -------- app/_locales/tr/messages.json | 8 -------- app/_locales/vi/messages.json | 8 -------- app/_locales/zh_CN/messages.json | 8 -------- shared/constants/permissions.test.js | 1 - shared/constants/snaps/permissions.ts | 3 --- ui/helpers/utils/permission.js | 6 ------ 18 files changed, 130 deletions(-) diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index d73c4a34c6d4..8ebf594c230b 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -3194,14 +3194,6 @@ "message": "Erlauben Sie dem Snap Lebenszyklus-Hooks zu verwenden, um den Code während seines Lebenszyklus zu bestimmten Zeiten auszuführen.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Für unbestimmte Zeit ausführen.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Gestatten Sie dem Snap, unbegrenzt ausgeführt zu werden, während es zum Beispiel große Datenmengen verarbeitet.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Ethereum-Konten hinzufügen und kontrollieren", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 5d0dec766243..f0fe5a4d75f8 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -3194,14 +3194,6 @@ "message": "Επιτρέψτε στο snap να χρησιμοποιεί επιχειρηματικά μοντέλα για την εκτέλεση κώδικα σε συγκεκριμένες χρονικές στιγμές κατά τη διάρκεια του κύκλου ζωής του.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Εκτέλεση επ' αόριστον.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Επιτρέψτε στο snap να εκτελείται επ' αόριστον, ενώ, για παράδειγμα, επεξεργάζεται μεγάλες ποσότητες δεδομένων.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Προσθήκη και έλεγχος λογαριασμών στο Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 847256600199..9f75a009836b 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -3305,14 +3305,6 @@ "message": "Allow the snap to use lifecycle hooks to run code at specific times during its lifecycle.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Run indefinitely.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Allow the snap to run indefinitely while, for example, processing large amounts of data.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Add and control Ethereum accounts", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 66e598cb99e9..e46548ee6056 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -3194,14 +3194,6 @@ "message": "Permita que el snap use ganchos de ciclo de vida para ejecutar código en momentos específicos durante su ciclo de vida.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Ejecutar indefinidamente.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Permita que el snap se ejecute indefinidamente mientras, por ejemplo, procesa grandes cantidades de datos.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Agregar y controlar cuentas de Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index aa812fc86cb8..d1e63b4ed696 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -3194,14 +3194,6 @@ "message": "Autorisez le Snap à utiliser des hooks de cycle de vie pour exécuter du code à des moments spécifiques de son cycle de vie.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Fonctionner indéfiniment.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Autoriser l’exécution illimitée du snap pendant, par exemple, le traitement de volumes importants de données.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Ajouter et gérer des comptes Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 6b7a2c81650c..ce8baf1eb30a 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -3194,14 +3194,6 @@ "message": "Snap को उसके लाइफसाइकल के दौरान खास समयों पर कोड चलाने के लिए लाइफसाइकल हुक का इस्तेमाल करने की अनुमति दें।", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "अनिश्चित काल तक चलाएं।", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "उदाहरण के लिए, बड़ी मात्रा में डेटा प्रॉसेस करते समय Snap को अनिश्चित काल तक चलने दें।", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Ethereum अकाउंट जोड़ें और नियंत्रित करें", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 23709960b406..d80e8c435dc8 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -3194,14 +3194,6 @@ "message": "Izinkan snap menggunakan lifecycle hook untuk menjalankan kode pada waktu tertentu selama siklus hidupnya.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Operasikan sepanjang waktu.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Izinkan snap beroperasi sepanjang waktu saat, sebagai contoh, memproses data dalam jumlah besar.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Tambah dan kontrol akun Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 0b360e8aca91..9bc852e12bb8 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -3194,14 +3194,6 @@ "message": "snapがライフサイクルフックを使用して、ライフサイクルの特定のタイミングでコードを実行することを許可します。", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "無期限で実行。", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "大きなデータの処理中など、snapが無期限で実行されることを許可します。", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "イーサリアムアカウントを追加して管理します", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 88d52c2f932a..e788e78e28ad 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -3194,14 +3194,6 @@ "message": "스냅으로 라이프사이클 훅을 사용하도록 허용하면 라이프사이클 동안 코드를 특정 횟수만큼 실행합니다.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "무기한 운용됩니다.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "예를 들어 많은 양의 데이터를 처리하는 동안 스냅이 무기한 실행되도록 허용합니다.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "이더리움 계정 추가 및 제어", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 0fef7b079cd9..66f295ba0a2a 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -3194,14 +3194,6 @@ "message": "Permitir que o snap use ganchos de ciclo de vida para executar códigos em momentos específicos durante seu ciclo de vida.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Executar indefinidamente.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Permitir que o snap seja executado indefinidamente, por exemplo, enquanto processa grandes volumes de dados.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Adicionar e controlar contas Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 38eded6378ff..3ce60f416e95 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -3194,14 +3194,6 @@ "message": "Разрешите snap использовать обработчики жизненного цикла для запуска кода в определенное время в течение его жизненного цикла.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Выполнять бесконечно.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Разрешите snap работать бесконечно, например, при обработке больших объемов данных.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Добавляйте счета Ethereum и управляйте ими", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 767be00968c8..00f6e2653e38 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -3194,14 +3194,6 @@ "message": "Pinapayagan ang snap na gumamit ng mga lifecycle hook para paganahin ang code sa mga espisipikong panahon sa oras ng lifecycle nito.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Patakbuhin ng walang katapusan.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Payagan ang snap para gumana nang walang limitasyon sa tagal habang, halimbawa, nagpoproseso ng maraming data.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Magdagdag at kontrolin ang mga Ethereum account", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 1122cae3602f..ebc5c7ee8f1a 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -3194,14 +3194,6 @@ "message": "Bu yaşam döngüsü sırasında belirli zamanlarda kod çalıştırmak için snapin yaşam döngüsü kancalarını kullanmasına izin verin.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Süresiz çalıştır.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Snapin örneğin büyük miktarda veri işlerken belirsiz süreyle çalışmasına izin verin.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Ethereum hesaplarını ekle ve kontrol et", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index fc801b890288..7f609615a8d0 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -3194,14 +3194,6 @@ "message": "Cho phép Snap sử dụng hook vòng đời để chạy mã vào những thời điểm cụ thể trong vòng đời của nó.", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "Chạy không giới hạn.", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "Ví dụ: cho phép Snap chạy vô thời hạn trong quá trình xử lý lượng lớn dữ liệu.", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "Thêm và kiểm soát các tài khoản Ethereum", "description": "The description for `snap_manageAccounts` permission" diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index c5f4a431970a..f85dfad64467 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -3194,14 +3194,6 @@ "message": "允许snap使用生命周期挂钩在其生命周期的特定时间运行代码。", "description": "An extended description for the `endowment:lifecycle-hooks` permission" }, - "permission_longRunning": { - "message": "无限期运行。", - "description": "The description for the `endowment:long-running` permission" - }, - "permission_longRunningDescription": { - "message": "允许snap无限期运行,例如在处理大量数据时。", - "description": "An extended description for the `endowment:long-running` permission" - }, "permission_manageAccounts": { "message": "添加并控制以太坊账户", "description": "The description for `snap_manageAccounts` permission" diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js index fc029f1c3b30..7ea0bb47eb5d 100644 --- a/shared/constants/permissions.test.js +++ b/shared/constants/permissions.test.js @@ -12,7 +12,6 @@ describe('EndowmentPermissions', () => { // test, so we re-add them here. expect(Object.keys(EndowmentPermissions).sort()).toStrictEqual( [ - 'endowment:long-running', 'endowment:lifecycle-hooks', 'endowment:name-lookup', ...Object.keys(endowmentPermissionBuilders).filter( diff --git a/shared/constants/snaps/permissions.ts b/shared/constants/snaps/permissions.ts index 0206061f7ba0..6e3a619b03a0 100644 --- a/shared/constants/snaps/permissions.ts +++ b/shared/constants/snaps/permissions.ts @@ -6,7 +6,6 @@ export const EndowmentPermissions = Object.freeze({ 'endowment:rpc': 'endowment:rpc', 'endowment:webassembly': 'endowment:webassembly', ///: BEGIN:ONLY_INCLUDE_IN(build-flask) - 'endowment:long-running': 'endowment:long-running', 'endowment:lifecycle-hooks': 'endowment:lifecycle-hooks', 'endowment:name-lookup': 'endowment:name-lookup', ///: END:ONLY_INCLUDE_IN @@ -32,8 +31,6 @@ export const ExcludedSnapEndowments = Object.freeze({ ///: BEGIN:ONLY_INCLUDE_IN(build-main) 'endowment:keyring': 'This endowment is still in development therefore not available.', - 'endowment:long-running': - 'endowment:long-running is deprecated. For more information please see https://github.com/MetaMask/snaps/issues/945.', 'endowment:lifecycle-hooks': 'This endowment is experimental and therefore not available.', ///: END:ONLY_INCLUDE_IN diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js index 2d125f1ab003..df625c2028f1 100644 --- a/ui/helpers/utils/permission.js +++ b/ui/helpers/utils/permission.js @@ -314,12 +314,6 @@ export const PERMISSION_DESCRIPTIONS = deepFreeze({ rightIcon: null, weight: 2, }), - [EndowmentPermissions['endowment:long-running']]: ({ t }) => ({ - label: t('permission_longRunning'), - description: t('permission_longRunningDescription'), - leftIcon: IconName.Link, - weight: 3, - }), [EndowmentPermissions['endowment:transaction-insight']]: ({ t, permissionValue,