Skip to content

Commit

Permalink
[FLASK] Remove long-running Snap permission (#20951)
Browse files Browse the repository at this point in the history
## **Description**
This PR removes `long-running` Snap endowment/permission.

Snaps team have decided to remove this endowment because of its
unpredictable security concerns around running Snaps indefinitely. This
endowment is removed in favor of the new endowments that will be focused
on solving certain use cases that require snap to be running for more
time than default.

## **Related issues**

_Fixes [#945](MetaMask/snaps#945

## **Related PR**
MetaMask/snaps#1751 (**required**)
MetaMask/metamask-docs#919

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained:
  - [ ] What problem this PR is solving.
  - [ ] How this problem was solved.
  - [ ] How reviewers can test my changes.
- [ ] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [ ] I’ve documented any added code.
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
david0xd authored Sep 27, 2023
1 parent 7fa8f3c commit 9cd148a
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 130 deletions.
8 changes: 0 additions & 8 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion shared/constants/permissions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions shared/constants/snaps/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions ui/helpers/utils/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9cd148a

Please sign in to comment.