From e2c29e952905127a60e55bd7b4edd2ea71d73932 Mon Sep 17 00:00:00 2001 From: David Drazic Date: Wed, 4 Oct 2023 14:39:38 +0200 Subject: [PATCH] Add Snaps directory link to the banner when at least one Snap is installed (#21167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR will add link to the Snaps directory when there is at least one Snap installed. If there is no Snap installed, link to the Snaps website will be used as before. ## **Manual testing steps** 1. Start with fresh installation of MetaMask or delete all Snaps. 2. Go to Settings > Snaps 3. Check the link that should link to the main Snaps website `https://metamask.io/snaps/` 4. Install one Snap 5. Check the link "Discover Snaps" that should link to the directory `https://snaps.metamask.io/` ## **Screenshots/Recordings** ### **Before** UI is not affected by the change. ### **After** UI is not affected by the change. ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1399 ## **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. --- ui/pages/settings/snaps/snaps-list-tab/snap-list-tab.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/pages/settings/snaps/snaps-list-tab/snap-list-tab.js b/ui/pages/settings/snaps/snaps-list-tab/snap-list-tab.js index e29f637cc3e6..8b5f0b8451f7 100644 --- a/ui/pages/settings/snaps/snaps-list-tab/snap-list-tab.js +++ b/ui/pages/settings/snaps/snaps-list-tab/snap-list-tab.js @@ -124,7 +124,11 @@ const SnapListTab = () => { > 0 + ? 'https://snaps.metamask.io/' + : 'https://metamask.io/snaps/' + } target="_blank" endIconName={IconName.Export} >