From 1183906176b6ef40bf16c90ea360c417c3efdbdc Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 29 Sep 2023 06:26:36 -0230 Subject: [PATCH 1/4] v11.1.1 --- CHANGELOG.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50cee8c83041..62326c9f93ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.1.1] + ## [11.1.0] ### Added - What's New popup on dropping of support for Ledger support for firefox ([#19498](https://github.com/MetaMask/metamask-extension/pull/19498)) @@ -4035,7 +4037,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.1.1...HEAD +[11.1.1]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...v11.1.1 [11.1.0]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...v11.1.0 [11.0.0]: https://github.com/MetaMask/metamask-extension/compare/v10.35.1...v11.0.0 [10.35.1]: https://github.com/MetaMask/metamask-extension/compare/v10.35.0...v10.35.1 diff --git a/package.json b/package.json index e7439421054f..73e126d0bb1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "11.1.0", + "version": "11.1.1", "private": true, "repository": { "type": "git", From c4f44f9449db6072a26e78d04dd8c7655a64d203 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 29 Sep 2023 07:47:31 -0230 Subject: [PATCH 2/4] Revert "Updated copy changes for display NFT Media (#20380)" (#21109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6c1b71b5845bb4fc07d383c1da7fb823e4c8533f. ## **Description** This is a temporary fix to https://github.com/MetaMask/MetaMask-planning/issues/1380 The changes needed to justify the copy update in #20380 have not been made yet. See [this comment](https://github.com/MetaMask/MetaMask-planning/issues/1380#issuecomment-1739861587) for more details We will make future fixes to the nft-controller to justify the copy changes that are being reverted here. After that, we can revert this revert. ## **Manual testing steps** In the "Security and Privacy" tab of settings, we should see a toggle with `"Enable OpenSea API"` as the label and `"Use OpenSea's API to fetch NFT data. NFT auto-detection relies on OpenSea's API, and will not be available when this is turned off."` as the description. We should be able to search in settings for that toggle. Switch to french, spanish and chinese languages, and the expected translations of the above copy should be present. When the toggle is off, already imported NFTs from opensea should display no image. Also, when the toggle is off, you should not be able to click "Refresh List" to detect NFTs. However, note that if the toggle is off and you manually import NFTs whose token metadata is stored on a server, a network request is still made to that server, and if the image of that NFT is stored on IPFS, it will be displayed. (This is what we will change in the future, before reverting this revert. ## **Screenshots/Recordings** _If applicable, add screenshots and/or recordings to visualize the before and after of your change._ ### After ![Screenshot 2023-08-03 at 5 10 30 PM](https://github.com/MetaMask/metamask-extension/assets/39872794/ea629ba1-4169-465f-ab9b-1c282aa8834d) ### Before ![Screenshot 2023-08-03 at 5 09 46 PM](https://github.com/MetaMask/metamask-extension/assets/39872794/c1401ec5-f9e7-4b7b-b10a-66bf20192c80) ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained: - [x] What problem this PR is solving. - [x] How this problem was solved. - [ ] How reviewers can test my changes. - [x] 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. --- app/_locales/de/messages.json | 9 ++++++--- app/_locales/el/messages.json | 9 ++++++--- app/_locales/en/messages.json | 18 +++++++++--------- app/_locales/es/messages.json | 9 ++++++--- app/_locales/es_419/messages.json | 6 ++++++ app/_locales/fr/messages.json | 9 ++++++--- app/_locales/hi/messages.json | 9 ++++++--- app/_locales/id/messages.json | 9 ++++++--- app/_locales/ja/messages.json | 9 ++++++--- app/_locales/ko/messages.json | 9 ++++++--- app/_locales/pt/messages.json | 9 ++++++--- app/_locales/pt_BR/messages.json | 6 ++++++ app/_locales/ru/messages.json | 9 ++++++--- app/_locales/tl/messages.json | 9 ++++++--- app/_locales/tr/messages.json | 9 ++++++--- app/_locales/vi/messages.json | 9 ++++++--- app/_locales/zh_CN/messages.json | 9 ++++++--- .../nfts-detection-notice-import-nfts.js | 2 +- ui/helpers/constants/settings.js | 4 ++-- ui/helpers/utils/settings-search.test.js | 8 ++++---- .../__snapshots__/security-tab.test.js.snap | 4 ++-- .../security-tab/security-tab.component.js | 5 ++--- 22 files changed, 116 insertions(+), 63 deletions(-) diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 4453a8226e78..4ee978a1c49c 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Backup-Erinnerung zur geheimen Wiederherstellungsphrase verwerfen" }, - "displayNftMedia": { - "message": "NFT-Medien anzeigen" - }, "domain": { "message": "Domain" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " In den Einstellungen aktivieren." }, + "enableOpenSeaAPI": { + "message": "OpenSea API aktivieren" + }, + "enableOpenSeaAPIDescription": { + "message": "Verwenden Sie die OpenSea's API, um NFT-Daten abzurufen. Die NFT-Auto-Erkennung basiert auf der OpenSea's API und wird nicht verfügbar sein, wenn diese deaktiviert ist." + }, "enableSmartSwaps": { "message": "Smart Swaps aktivieren" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 7d3195bf43a1..8b26d947bbc3 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Απορρίψτε την υπενθύμιση δημιουργίας αντιγράφων ασφαλείας της Μυστικής Φράσης Ανάκτησης" }, - "displayNftMedia": { - "message": "Εμφάνιση των μέσων NFT" - }, "domain": { "message": "Τομέας" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": "Ενεργοποιήστε το από τις Ρυθμίσεις." }, + "enableOpenSeaAPI": { + "message": "Ενεργοποίηση OpenSea API" + }, + "enableOpenSeaAPIDescription": { + "message": "Χρησιμοποιήστε το API OpenSea για λήψη δεδομένων NFT. Η αυτόματη ανίχνευση NFT βασίζεται στο API του OpenSea, και δεν θα είναι διαθέσιμη όταν αυτό είναι απενεργοποιημένο." + }, "enableSmartSwaps": { "message": "Ενεργοποίηση των έξυπνων ανταλλαγών" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 9ef0ad434ff4..5f82f40cc16b 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1292,12 +1292,6 @@ "dismissReminderField": { "message": "Dismiss Secret Recovery Phrase backup reminder" }, - "displayNftMedia": { - "message": "Display NFT media" - }, - "displayNftMediaDesc": { - "message": "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off. If NFT media is fully located on IPFS, it can still be displayed even when this feature is turned off." - }, "domain": { "message": "Domain" }, @@ -1426,6 +1420,12 @@ "enableFromSettings": { "message": " Enable it from Settings." }, + "enableOpenSeaAPI": { + "message": "Enable OpenSea API" + }, + "enableOpenSeaAPIDescription": { + "message": "Use OpenSea's API to fetch NFT data. NFT auto-detection relies on OpenSea's API, and will not be available when this is turned off." + }, "enableSmartSwaps": { "message": "Enable smart swaps" }, @@ -2490,7 +2490,7 @@ "message": "New contract" }, "newNFTDetectedInImportNFTsMessage": { - "message": "To see your NFT, turn on Display NFT media in $1.", + "message": "To use Opensea see your NFT, turn on 'Enable OpenSea API' in $1.", "description": "$1 is used for newNFTDetectedInImportNFTsMessageStrongText" }, "newNFTDetectedInImportNFTsMessageStrongText": { @@ -3801,8 +3801,8 @@ "selectAnAction": { "message": "Select an action" }, - "selectDisplayMediaPrivacyPreference": { - "message": "Turn on Display NFT media" + "selectEnableOpenseaAPIPrivacyPreference": { + "message": "Turn on Enable Opensea API" }, "selectHdPath": { "message": "Select HD path" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index c903bd884298..32066acf8b21 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Ignorar el recordatorio de respaldo de la frase de recuperación" }, - "displayNftMedia": { - "message": "Mostrar medios NFT" - }, "domain": { "message": "Dominio" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Actívela en Configuración." }, + "enableOpenSeaAPI": { + "message": "Habilite el API de OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Utilice la API de OpenSea para obtener los datos de NFT. La autodetección de NFT depende de la API de OpenSea y no estará disponible si la API está desactivada." + }, "enableSmartSwaps": { "message": "Habilitar intercambios inteligentes" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 787544c41b41..d148117d7e48 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -725,6 +725,12 @@ "enableFromSettings": { "message": " Actívela en Configuración." }, + "enableOpenSeaAPI": { + "message": "Activar API de OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Utilice la API de OpenSea para obtener los datos de NFT. La autodetección de NFT depende de la API de OpenSea y no estará disponible si la API está desactivada." + }, "enableToken": { "message": "activar $1", "description": "$1 is a token symbol, e.g. ETH" diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 4a8aed83c3ea..7c1eb5b70e3c 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Annuler le rappel de sauvegarde de la phrase secrète de récupération" }, - "displayNftMedia": { - "message": "Afficher les médias NFT" - }, "domain": { "message": "Domaine" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Activez-la depuis les Paramètres." }, + "enableOpenSeaAPI": { + "message": "Activer l’API OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Utilisez l’API OpenSea pour récupérer les données de NFT. La détection automatique de NFT repose sur l’API OpenSea et ne sera pas disponible si elle est désactivée." + }, "enableSmartSwaps": { "message": "Activer les contrats de swap intelligents" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 000fa5df85bf..d40befd3313f 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "सीक्रेट रिकवरी फ्रेज़ बैकअप रिमाइंडर खारिज करें" }, - "displayNftMedia": { - "message": "NFT मीडिया को दिखाएं" - }, "domain": { "message": "डोमेन" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " इसे सेटिंग्स से इनेबल करें।" }, + "enableOpenSeaAPI": { + "message": "OpenSea API इनेबल करें" + }, + "enableOpenSeaAPIDescription": { + "message": "NFT डेटा लाने के लिए OpenSea के API का उपयोग करें। NFT ऑटो-डिटेक्शन OpenSea के API पर निर्भर करता है, और इसके बंद होने पर उपलब्ध नहीं होगा।" + }, "enableSmartSwaps": { "message": "स्मार्ट स्वैप इनेबल करें" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 4e6832b3ebf3..420e21ab98e4 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Lewatkan pengingat pencadangan Frasa Pemulihan Rahasia" }, - "displayNftMedia": { - "message": "Tampilkan media NFT" - }, "domain": { "message": "Domain" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Aktifkan dari Pengaturan." }, + "enableOpenSeaAPI": { + "message": "Aktifkan API OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Gunakan API OpenSea untuk mengambil data NFT. Deteksi otomatis NFT bergantung pada API OpenSea, dan tidak akan tersedia saat API ditutup." + }, "enableSmartSwaps": { "message": "Aktifkan pertukaran cerdas" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 8b3085be8c7b..0d2f80a2bc10 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "シークレットリカバリーフレーズのバックアップリマインダーを解除" }, - "displayNftMedia": { - "message": "NFTメディアの表示" - }, "domain": { "message": "ドメイン" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " 設定で有効にします。" }, + "enableOpenSeaAPI": { + "message": "OpenSea APIを有効にする" + }, + "enableOpenSeaAPIDescription": { + "message": "OpenSea APIを使用してNFTデータを取得します。NFT自動検出はOpenSea APIを使用するため、この設定をオフにすると利用できなくなります。" + }, "enableSmartSwaps": { "message": "スマートスワップを有効にする" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index eb9d9341565d..db35ac06a4af 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -1289,9 +1289,6 @@ "dismissReminderField": { "message": "비밀복구구문 백업 알림 해지" }, - "displayNftMedia": { - "message": "NFT 미디어 표시" - }, "domain": { "message": "도메인" }, @@ -1420,6 +1417,12 @@ "enableFromSettings": { "message": " 설정에서 이 기능을 활성화합니다." }, + "enableOpenSeaAPI": { + "message": "OpenSea API 활성화" + }, + "enableOpenSeaAPIDescription": { + "message": "OpenSea의 API를 사용하여 NFT 데이터를 가져옵니다. NFT 자동 감지는 OpenSea의 API에 의존하며 이 API가 꺼져 있으면 사용할 수 없습니다." + }, "enableSmartSwaps": { "message": "스마트 스왑 활성화" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index c98905cbb685..55d976198132 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Descartar o lembrete de backup da Frase de Recuperação Secreta" }, - "displayNftMedia": { - "message": "Exibir mídias de NFTs" - }, "domain": { "message": "Domínio" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Ative nas Configurações." }, + "enableOpenSeaAPI": { + "message": "Habilitar API do OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Use a API OpenSea para recuperar dados de NFTs. A detecção automática de NFTs depende da API OpenSea e não estará disponível quando essa opção estiver desativada." + }, "enableSmartSwaps": { "message": "Ativar trocas inteligentes" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 91e305e5b3d5..c51166be26bd 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -725,6 +725,12 @@ "enableFromSettings": { "message": " Ative nas Configurações." }, + "enableOpenSeaAPI": { + "message": "Ativar a API OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Use a API OpenSea para recuperar dados de NFTs. A detecção automática de NFTs depende da API OpenSea e não estará disponível quando essa opção estiver desativada." + }, "enableToken": { "message": "ativar $1", "description": "$1 is a token symbol, e.g. ETH" diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 5c69b99a5491..51f7b1e92d77 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Отклонить напоминание о необходимости создать резервную копию секретной фразы для восстановления" }, - "displayNftMedia": { - "message": "Показать NFT-носитель" - }, "domain": { "message": "Домен" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Включите его в Настройках." }, + "enableOpenSeaAPI": { + "message": "Включить API OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Используйте API OpenSea для получения данных NFT. Для автоматического обнаружения NFT используется API OpenSea, и такое обнаружение будет недоступно, если этот API отключен." + }, "enableSmartSwaps": { "message": "Включить смарт-свопы" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 0316b1429b4f..a9648e6dc1ff 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "I-dismiss ang back up na paalala ng Lihim na Parirala sa Pagbawi" }, - "displayNftMedia": { - "message": "Ipakita ang NFT media" - }, "domain": { "message": "Domain" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Paganahin ito mula sa Mga Setting." }, + "enableOpenSeaAPI": { + "message": "Paganahin sa OpenSea API" + }, + "enableOpenSeaAPIDescription": { + "message": "Gamitin ang API ng Opensea upang kunin ang NFT data. ang NFT auto-detection ay umaasa sa API ng OpenSea, at hindi magiging available kapag ito ay isinara." + }, "enableSmartSwaps": { "message": "Paganahin ang mga smart swap" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 7349af9d8c07..d5f858d14c34 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Gizli Kurtarma İfadesi yedekleme hatırlatma uyarısını yoksay" }, - "displayNftMedia": { - "message": "NFT medyasını göster" - }, "domain": { "message": "Alan" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Ayarlardan etkinleştir." }, + "enableOpenSeaAPI": { + "message": "OpenSea API'yi etkinleştir" + }, + "enableOpenSeaAPIDescription": { + "message": "NFT verilerini almak için OpenSea API'sini kullanın. NFT otomatik algılama OpenSea API'ye dayalıdır ve bu kapatılırsa mevcut olmayacaktır." + }, "enableSmartSwaps": { "message": "Akıllı swap'ları etkinleştirin" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 8c7ba712bc02..004878d5b896 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "Tắt lời nhắc sao lưu Cụm từ khôi phục bí mật" }, - "displayNftMedia": { - "message": "Hiển thị phương tiện NFT" - }, "domain": { "message": "Tên miền" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " Bật trong Cài Đặt." }, + "enableOpenSeaAPI": { + "message": "Bật API OpenSea" + }, + "enableOpenSeaAPIDescription": { + "message": "Sử dụng API của OpenSea để tìm nạp dữ liệu NFT. Tính năng tự động phát hiện NFT dựa vào API của OpenSea và sẽ không khả dụng nếu tính năng này bị tắt." + }, "enableSmartSwaps": { "message": "Kích hoạt hoán đổi thông minh" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index fc7fef9da82b..5bbe9036bd2f 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -1292,9 +1292,6 @@ "dismissReminderField": { "message": "关闭账户私钥助记词备份提醒" }, - "displayNftMedia": { - "message": "显示NFT媒体" - }, "domain": { "message": "域" }, @@ -1423,6 +1420,12 @@ "enableFromSettings": { "message": " 从设置中启用它。" }, + "enableOpenSeaAPI": { + "message": "启用 OpenSea API" + }, + "enableOpenSeaAPIDescription": { + "message": "使用 OpenSea 的 API 获取 NFT 数据。NFT 自动检测依赖于 OpenSea 的 API,在后者关闭时自动检测将不可用。" + }, "enableSmartSwaps": { "message": "启用智能兑换" }, diff --git a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js index ab91b80ee397..73f5ece2b4c5 100644 --- a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js +++ b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js @@ -11,7 +11,7 @@ export default function NftsDetectionNoticeImportNFTs() { return ( { e.preventDefault(); history.push(`${SECURITY_ROUTE}#opensea-api`); diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index 108292274a85..f557b3fc9275 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -222,8 +222,8 @@ export const SETTINGS_CONSTANTS = [ }, { tabMessage: (t) => t('securityAndPrivacy'), - sectionMessage: (t) => t('displayNftMedia'), - descriptionMessage: (t) => t('displayNftMediaDesc'), + sectionMessage: (t) => t('enableOpenSeaAPI'), + descriptionMessage: (t) => t('enableOpenSeaAPIDescription'), route: `${SECURITY_ROUTE}#opensea-api`, icon: 'fa fa-lock', }, diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js index 59f15f018edc..cde4452d6ab3 100644 --- a/ui/helpers/utils/settings-search.test.js +++ b/ui/helpers/utils/settings-search.test.js @@ -101,10 +101,10 @@ const t = (key) => { return 'Autodetect tokens'; case 'autoDetectTokensDescription': return 'We use third-party APIs to detect and display new tokens sent to your wallet. Turn off if you don’t want the app to pull data from those services.'; - case 'displayNftMedia': - return 'Display NFT media'; - case 'displayNftMediaDesc': - return "Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off."; + case 'enableOpenSeaAPI': + return 'Enable OpenSea API'; + case 'enableOpenSeaAPIDescription': + return "Use OpenSea's API to fetch NFT data. NFT auto-detection relies on OpenSea's API, and will not be available when this is turned off."; case 'useNftDetection': return 'Autodetect NFTs'; case 'useNftDetectionDescriptionText': diff --git a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap index d900b315254a..ceabeba11c83 100644 --- a/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap +++ b/ui/pages/settings/security-tab/__snapshots__/security-tab.test.js.snap @@ -1159,12 +1159,12 @@ exports[`Security Tab should match snapshot 1`] = ` class="settings-page__content-item" > - Display NFT media + Enable OpenSea API
- Displaying NFT media and data exposes your IP address to OpenSea or other third parties. NFT autodetection relies on this feature, and won't be available when it is turned off. If NFT media is fully located on IPFS, it can still be displayed even when this feature is turned off. + Use OpenSea's API to fetch NFT data. NFT auto-detection relies on OpenSea's API, and will not be available when this is turned off.
- {t('displayNftMedia')} + {t('enableOpenSeaAPI')}
- {t('displayNftMediaDesc')} + {t('enableOpenSeaAPIDescription')}
-
Date: Fri, 29 Sep 2023 11:59:52 +0100 Subject: [PATCH 3/4] fix import NFT notice condition (#21100) ## **Description** [We recently changed](https://github.com/MetaMask/metamask-extension/pull/20981) the copy on some parts of the NFT flows, including this import NFT screen. The previous logic was to show the notice if autodetect functionality was enabled, but with the new copy, a new condition is more appropriate. This PR changes that condition. Edit from Dan M: This PR also now addresses a small UX issue. The "Import NFT" modal is now automatically closed if the user clicks the link to settings in the import NFT notice. This could have been done in a separate PR, however it is related to the functional testing of the present PR, so I decided to include it. ## **Manual testing steps** (From DanM: the strikethroughs and italics below are my edits, I think the original was a typo, but I am leaving here so others can audit my changes) 1. Turn off Display NFT Media 2. Click import NFT 3. The notice ~~does not~~ _does_ appear. 4. Turn on Display NFT Media 5. Click import NFT 6. The notice ~~does~~ _does not_ appear. scenario 2: 1. Turn off Display NFT Media 2. Click import NFT 3. Click "Turn on Display NFT Media". You should be taken to the settings page and the modal should be closed. 4. Once on the settings page, click the "Turn on Display NFT Media toggle" 5. Return to the home screen and click "Import NFT" 6. The notice does not appear. --------- Co-authored-by: Dan J Miller --- .../nfts-detection-notice-import-nfts.js | 8 +++++++- .../multichain/import-nfts-modal/import-nfts-modal.js | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js index 73f5ece2b4c5..b16c712cd21f 100644 --- a/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js +++ b/ui/components/app/nfts-detection-notice-import-nfts/nfts-detection-notice-import-nfts.js @@ -1,10 +1,11 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; import { BannerAlert } from '../../component-library'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { SECURITY_ROUTE } from '../../../helpers/constants/routes'; -export default function NftsDetectionNoticeImportNFTs() { +export default function NftsDetectionNoticeImportNFTs({ onActionButtonClick }) { const t = useI18nContext(); const history = useHistory(); @@ -15,6 +16,7 @@ export default function NftsDetectionNoticeImportNFTs() { actionButtonOnClick={(e) => { e.preventDefault(); history.push(`${SECURITY_ROUTE}#opensea-api`); + onActionButtonClick?.(); }} > {t('newNFTDetectedInImportNFTsMessage', [ @@ -25,3 +27,7 @@ export default function NftsDetectionNoticeImportNFTs() { ); } + +NftsDetectionNoticeImportNFTs.propTypes = { + onActionButtonClick: PropTypes.func.isRequired, +}; diff --git a/ui/components/multichain/import-nfts-modal/import-nfts-modal.js b/ui/components/multichain/import-nfts-modal/import-nfts-modal.js index 39f18bd61f33..52e1fb3256f6 100644 --- a/ui/components/multichain/import-nfts-modal/import-nfts-modal.js +++ b/ui/components/multichain/import-nfts-modal/import-nfts-modal.js @@ -24,8 +24,8 @@ import { useI18nContext } from '../../../hooks/useI18nContext'; import { getCurrentChainId, getIsMainnet, + getOpenSeaEnabled, getSelectedAddress, - getUseNftDetection, } from '../../../selectors'; import { addNftVerifyOwnership, @@ -57,7 +57,7 @@ export const ImportNftsModal = ({ onClose }) => { const t = useI18nContext(); const history = useHistory(); const dispatch = useDispatch(); - const useNftDetection = useSelector(getUseNftDetection); + const isDisplayNFTMediaToggleEnabled = useSelector(getOpenSeaEnabled); const isMainnet = useSelector(getIsMainnet); const nftsDropdownState = useSelector(getNftsDropdownState); const selectedAddress = useSelector(getSelectedAddress); @@ -159,9 +159,9 @@ export const ImportNftsModal = ({ onClose }) => { {t('importNFT')} - {isMainnet && !useNftDetection ? ( + {isMainnet && !isDisplayNFTMediaToggleEnabled ? ( - + ) : null} {nftAddFailed && ( From d394a8a7b8a935c347a192c47d98740c51e90810 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Fri, 29 Sep 2023 09:08:38 -0230 Subject: [PATCH 4/4] Update changelog for v11.1.1 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62326c9f93ad..421b6f8969a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [11.1.1] +### Fixed +- Ensure NFT settings notice in the NFT import modal is shown and hidden correctly, and that the modal is hidden when clicking the link to settings ([#21100](https://github.com/MetaMask/metamask-extension/pull/21100)) +- Modify settings toggle copy to more accurately describe behaviour ([#21109](https://github.com/MetaMask/metamask-extension/pull/21109)) ## [11.1.0] ### Added @@ -4038,7 +4041,7 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.1.1...HEAD -[11.1.1]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...v11.1.1 +[11.1.1]: https://github.com/MetaMask/metamask-extension/compare/v11.1.0...v11.1.1 [11.1.0]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...v11.1.0 [11.0.0]: https://github.com/MetaMask/metamask-extension/compare/v10.35.1...v11.0.0 [10.35.1]: https://github.com/MetaMask/metamask-extension/compare/v10.35.0...v10.35.1