mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #18486 from MetaMask/Version-v10.28.2
Version v10.28.2 RC
This commit is contained in:
commit
22cb8cefe7
@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [10.28.2]
|
||||
### Fixed
|
||||
- Fix network switching prompted by dapps by fixing the `wallet_switchEthereumChain` handler. ([#18483](https://github.com/MetaMask/metamask-extension/pull/18483))
|
||||
- Fix to ensure all users see the NFT and transaction security notifications ([#18460](https://github.com/MetaMask/metamask-extension/pull/18460))
|
||||
- Fix issue blocking Hindi, Japanese and Turkish language users from installing from the Chrome store ([#18487](https://github.com/MetaMask/metamask-extension/pull/18487))
|
||||
|
||||
## [10.28.1]
|
||||
### Changed
|
||||
- Fix release automation ([#18427](https://github.com/MetaMask/metamask-extension/pull/18427))
|
||||
@ -3643,7 +3649,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Uncategorized
|
||||
- Added the ability to restore accounts from seed words.
|
||||
|
||||
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.28.1...HEAD
|
||||
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.28.2...HEAD
|
||||
[10.28.2]: https://github.com/MetaMask/metamask-extension/compare/v10.28.1...v10.28.2
|
||||
[10.28.1]: https://github.com/MetaMask/metamask-extension/compare/v10.28.0...v10.28.1
|
||||
[10.28.0]: https://github.com/MetaMask/metamask-extension/compare/v10.27.0...v10.28.0
|
||||
[10.27.0]: https://github.com/MetaMask/metamask-extension/compare/v10.26.2...v10.27.0
|
||||
|
6
app/_locales/de/messages.json
generated
6
app/_locales/de/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Ethereum Merge ist da!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Sicherheits- und Datenschutzeinstellungen anzeigen"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Sicherheits- und Datenschutzeinstellungen"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Mobile MetaMask-Anwender können jetzt Token in ihren mobilen Wallets swappen. Scannen Sie den QR-Code, um die mobile App zu erhalten und mit dem Swapping zu beginnen.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/el/messages.json
generated
6
app/_locales/el/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Η συγχώνευση στο Ethereum είναι εδώ!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Εμφάνιση ρυθμίσεων Ασφάλειας & Απορρήτου"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Ρυθμίσεις Ασφάλειας & Απορρήτου"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Οι χρήστες του MetaMask Mobile μπορούν τώρα να ανταλλάξουν tokens μέσα στο κινητό τους πορτοφόλι. Σαρώστε τον κωδικό QR για να πάρετε την εφαρμογή για κινητά και να αρχίσετε να ανταλλάζετε.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
21
app/_locales/en/messages.json
generated
21
app/_locales/en/messages.json
generated
@ -2366,40 +2366,37 @@
|
||||
"notifications15Title": {
|
||||
"message": "The Ethereum Merge is here!"
|
||||
},
|
||||
"notifications16ActionText": {
|
||||
"notifications18ActionText": {
|
||||
"message": "Enable security alerts"
|
||||
},
|
||||
"notifications16DescriptionOne": {
|
||||
"notifications18DescriptionOne": {
|
||||
"message": "Get alerts from third parties when you may have received a malicious request.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes Opensea Security Provider feature."
|
||||
},
|
||||
"notifications16DescriptionThree": {
|
||||
"notifications18DescriptionThree": {
|
||||
"message": "Always be sure to do your own due diligence before approving any requests.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes Opensea Security Provider feature."
|
||||
},
|
||||
"notifications16DescriptionTwo": {
|
||||
"notifications18DescriptionTwo": {
|
||||
"message": "OpenSea is the first provider for this feature. More providers coming soon!",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes Opensea Security Provider feature."
|
||||
},
|
||||
"notifications16Title": {
|
||||
"message": "Stay safe with security alerts"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"notifications19ActionText": {
|
||||
"message": "Enable NFT autodetection"
|
||||
},
|
||||
"notifications17DescriptionOne": {
|
||||
"notifications19DescriptionOne": {
|
||||
"message": "Two ways you can get started:",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes NFT autodetection feature."
|
||||
},
|
||||
"notifications17DescriptionThree": {
|
||||
"notifications19DescriptionThree": {
|
||||
"message": "We only support ERC-721 at the moment.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes NFT autodetection feature."
|
||||
},
|
||||
"notifications17DescriptionTwo": {
|
||||
"notifications19DescriptionTwo": {
|
||||
"message": "Manually add your NFTs, or turn on NFT autodetection in Settings > Experimental.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes NFT autodetection feature."
|
||||
},
|
||||
"notifications17Title": {
|
||||
"notifications19Title": {
|
||||
"message": "See your NFTs like never before"
|
||||
},
|
||||
"notifications1Description": {
|
||||
|
6
app/_locales/es/messages.json
generated
6
app/_locales/es/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "¡La Fusión de Ethereum está aquí!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Mostrar configuración de seguridad y privacidad"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Configuración de Seguridad y privacidad"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Los usuarios de la aplicación móvil de MetaMask ahora pueden canjear tokens en su cartera móvil. Escanee el código QR para obtener la aplicación móvil y comience a canjear.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/fr/messages.json
generated
6
app/_locales/fr/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "La fusion Ethereum est en marche !"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Afficher les paramètres de sécurité et de confidentialité"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Paramètres de sécurité et de confidentialité"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Les utilisateurs de MetaMask Mobile peuvent désormais échanger des jetons dans leur portefeuille mobile. Scannez le code QR pour obtenir l’application mobile et commencez à échanger.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
10
app/_locales/hi/messages.json
generated
10
app/_locales/hi/messages.json
generated
@ -1604,11 +1604,11 @@
|
||||
"description": "Is the bolded text in 'holdToRevealContent1'"
|
||||
},
|
||||
"holdToRevealContent3": {
|
||||
"message": "इसे किसी के साथ साझा न करें। $1$2",
|
||||
"message": "इसे किसी के साथ साझा न करें। $1,$2",
|
||||
"description": "$1 is a message from 'holdToRevealContent4' and $2 is a text link with the message from 'holdToRevealContent5'"
|
||||
},
|
||||
"holdToRevealContent4": {
|
||||
"message": "MetaMask सपोर्ट इसका अनुरोध नहीं करेगा,",
|
||||
"message": "MetaMask सपोर्ट इसका अनुरोध नहीं करेगा",
|
||||
"description": "Part of 'holdToRevealContent3'"
|
||||
},
|
||||
"holdToRevealContent5": {
|
||||
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "इथेरियम मर्ज यहाँ है!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "सुरक्षा और गोपनीयता सेटिंग्स को दिखाएं"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "सुरक्षा और गोपनीयता सेटिंग्स"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "MetaMask Mobile उपयोगकर्ता अब अपने मोबाइल वॉलेट के अंदर टोकन स्वैप कर सकते हैं। मोबाइल ऐप प्राप्त करने के लिए QR कोड को स्कैन करें और स्वैप करना शुरू करें।",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/id/messages.json
generated
6
app/_locales/id/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Penggabungan Ethereum telah tiba!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Tampilkan pengaturan Keamanan & Privasi"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Pengaturan Keamanan & Privasi"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Pengguna MetaMask Mobile kini bisa menukar token di dalam dompet seluler mereka. Pindai kode QR untuk mendapatkan aplikasi seluler dan mulai menukar.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
10
app/_locales/ja/messages.json
generated
10
app/_locales/ja/messages.json
generated
@ -1604,11 +1604,11 @@
|
||||
"description": "Is the bolded text in 'holdToRevealContent1'"
|
||||
},
|
||||
"holdToRevealContent3": {
|
||||
"message": "これは誰にも教えないでください。$1$2",
|
||||
"message": "これは誰にも教えないでください。$1、$2",
|
||||
"description": "$1 is a message from 'holdToRevealContent4' and $2 is a text link with the message from 'holdToRevealContent5'"
|
||||
},
|
||||
"holdToRevealContent4": {
|
||||
"message": "MetaMask サポートがこの情報を尋ねることはなく、",
|
||||
"message": "MetaMask サポートがこの情報を尋ねることはなく",
|
||||
"description": "Part of 'holdToRevealContent3'"
|
||||
},
|
||||
"holdToRevealContent5": {
|
||||
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Ethereum のマージ (Merge) が完了しました!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "セキュリティおよびプライバシー設定を表示"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "セキュリティおよびプライバシー設定"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "MetaMask Mobileのユーザーが、モバイルウォレット内でトークンを交換できるようになりました。QRコードをスキャンしてモバイルアプリを取得し、スワップを開始します。",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/ko/messages.json
generated
6
app/_locales/ko/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "이더리움 머지가 완료되었습니다!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "보안 및 개인정보 설정 표시"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "보안 및 개인정보 설정 표시"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "MetaMask 모바일 사용자는 이제 모바일 지갑에서 토큰을 스왑할 수 있습니다. QR 코드를 스캔하여 모바일 앱을 설치하고 스왑을 시작하세요.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/pt/messages.json
generated
6
app/_locales/pt/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "A fusão do Ethereum chegou!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Mostrar configurações de segurança e privacidade"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Configurações de segurança e privacidade"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Usuários da MetaMask Mobile agora podem trocar tokens dentro de sua carteira mobile. Leia o QR code para obter o aplicativo para dispositivos móveis e comece a trocar.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/ru/messages.json
generated
6
app/_locales/ru/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Ethereum Merge уже досутпно!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Показать настройки безопасности и конфиденциальности"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Настройки безопасности и конфиденциальности"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Теперь пользователи MetaMask Mobile могут обменивать токены в своем мобильном кошельке. Отсканируйте QR-код, чтобы скачать мобильное приложение и начать обмен.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/tl/messages.json
generated
6
app/_locales/tl/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Narito na ang Ethereum Merge!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Ipakita ang mga setting ng Seguridad at Pagkapribado"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Mga Setting ng Seguridad at Pagkapribado"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Ang mga user ng MetaMask Mobile ay maaari na ngayong mag-swap ng mga token sa loob ng kanilang mobile wallet. I-scan ang QR code para makuha ang mobile app at magsimulang mag-swap.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
8
app/_locales/tr/messages.json
generated
8
app/_locales/tr/messages.json
generated
@ -1596,7 +1596,7 @@
|
||||
"message": "GKİ'yi göstermek için basılı tut"
|
||||
},
|
||||
"holdToRevealContent1": {
|
||||
"message": "Gizli Kurtarma İfadeniz: $1$",
|
||||
"message": "Gizli Kurtarma İfadeniz: $1",
|
||||
"description": "$1 is a bolded text with the message from 'holdToRevealContent2'"
|
||||
},
|
||||
"holdToRevealContent2": {
|
||||
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Ethereum Birleşmesi başladı!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Güvenlik ve Gizlilik ayarlarını göster"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Güvenlik ve Gizlilik Ayarları"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "MetaMask Mobil kullanıcıları artık mobil cüzdanları içinde token takas edebilirler. Mobil uygulamayı edinmek ve takas yapmaya başlamak için QR kodunu tarayın.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/vi/messages.json
generated
6
app/_locales/vi/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "Hợp nhất Ethereum đã được triển khai!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "Hiển thị cài đặt Bảo mật và Quyền riêng tư"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "Cài đặt Bảo mật và Quyền riêng tư"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "Giờ đây, người dùng MetaMask trên điện thoại di động có thể hoán đổi token trong ví di động của họ. Quét mã QR để tải ứng dụng di động và bắt đầu hoán đổi.",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
6
app/_locales/zh_CN/messages.json
generated
6
app/_locales/zh_CN/messages.json
generated
@ -2336,12 +2336,6 @@
|
||||
"notifications15Title": {
|
||||
"message": "以太坊合并来了!"
|
||||
},
|
||||
"notifications17ActionText": {
|
||||
"message": "显示安全和隐私设置"
|
||||
},
|
||||
"notifications17Title": {
|
||||
"message": "安全和隐私设置"
|
||||
},
|
||||
"notifications1Description": {
|
||||
"message": "MetaMask Mobile 用户现在可以在他们的移动钱包中交换代币。扫描二维码以获取移动应用程序并开始交换。",
|
||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||
|
@ -115,7 +115,7 @@ async function switchEthereumChainHandler(
|
||||
) {
|
||||
setProviderType(approvedRequestData.type);
|
||||
} else {
|
||||
await setActiveNetwork(approvedRequestData);
|
||||
await setActiveNetwork(approvedRequestData.id);
|
||||
}
|
||||
res.result = null;
|
||||
} catch (error) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "metamask-crx",
|
||||
"version": "10.28.1",
|
||||
"version": "10.28.2",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -81,13 +81,21 @@ export const UI_NOTIFICATIONS = {
|
||||
16: {
|
||||
id: 16,
|
||||
date: null,
|
||||
},
|
||||
17: {
|
||||
id: 17,
|
||||
date: null,
|
||||
},
|
||||
18: {
|
||||
id: 18,
|
||||
date: null,
|
||||
image: {
|
||||
src: 'images/open-sea-security-provider.svg',
|
||||
width: '100%',
|
||||
},
|
||||
},
|
||||
17: {
|
||||
id: 17,
|
||||
19: {
|
||||
id: 19,
|
||||
date: null,
|
||||
image: {
|
||||
src: 'images/nfts.svg',
|
||||
@ -240,34 +248,34 @@ export const getTranslatedUINotifications = (t, locale) => {
|
||||
)
|
||||
: '',
|
||||
},
|
||||
16: {
|
||||
...UI_NOTIFICATIONS[16],
|
||||
title: t('notifications16Title'),
|
||||
18: {
|
||||
...UI_NOTIFICATIONS[18],
|
||||
title: t('notifications18Title'),
|
||||
description: [
|
||||
t('notifications16DescriptionOne'),
|
||||
t('notifications16DescriptionTwo'),
|
||||
t('notifications16DescriptionThree'),
|
||||
t('notifications18DescriptionOne'),
|
||||
t('notifications18DescriptionTwo'),
|
||||
t('notifications18DescriptionThree'),
|
||||
],
|
||||
actionText: t('notifications16ActionText'),
|
||||
date: UI_NOTIFICATIONS[16].date
|
||||
actionText: t('notifications18ActionText'),
|
||||
date: UI_NOTIFICATIONS[18].date
|
||||
? new Intl.DateTimeFormat(formattedLocale).format(
|
||||
new Date(UI_NOTIFICATIONS[16].date),
|
||||
new Date(UI_NOTIFICATIONS[18].date),
|
||||
)
|
||||
: '',
|
||||
},
|
||||
|
||||
17: {
|
||||
...UI_NOTIFICATIONS[17],
|
||||
title: t('notifications17Title'),
|
||||
19: {
|
||||
...UI_NOTIFICATIONS[19],
|
||||
title: t('notifications19Title'),
|
||||
description: [
|
||||
t('notifications17DescriptionOne'),
|
||||
t('notifications17DescriptionTwo'),
|
||||
t('notifications17DescriptionThree'),
|
||||
t('notifications19DescriptionOne'),
|
||||
t('notifications19DescriptionTwo'),
|
||||
t('notifications19DescriptionThree'),
|
||||
],
|
||||
actionText: t('notifications17ActionText'),
|
||||
date: UI_NOTIFICATIONS[17].date
|
||||
actionText: t('notifications19ActionText'),
|
||||
date: UI_NOTIFICATIONS[19].date
|
||||
? new Intl.DateTimeFormat(formattedLocale).format(
|
||||
new Date(UI_NOTIFICATIONS[17].date),
|
||||
new Date(UI_NOTIFICATIONS[19].date),
|
||||
)
|
||||
: '',
|
||||
},
|
||||
|
@ -114,11 +114,21 @@ function defaultFixture() {
|
||||
16: {
|
||||
date: null,
|
||||
id: 16,
|
||||
isShown: true,
|
||||
isShown: false,
|
||||
},
|
||||
17: {
|
||||
date: null,
|
||||
id: 17,
|
||||
isShown: false,
|
||||
},
|
||||
18: {
|
||||
date: null,
|
||||
id: 18,
|
||||
isShown: true,
|
||||
},
|
||||
19: {
|
||||
date: null,
|
||||
id: 19,
|
||||
isShown: true,
|
||||
},
|
||||
},
|
||||
|
102
test/e2e/tests/switch-custom-network.spec.js
Normal file
102
test/e2e/tests/switch-custom-network.spec.js
Normal file
@ -0,0 +1,102 @@
|
||||
const { strict: assert } = require('assert');
|
||||
const FixtureBuilder = require('../fixture-builder');
|
||||
const { convertToHexValue, withFixtures } = require('../helpers');
|
||||
|
||||
describe('Swtich ethereum chain', function () {
|
||||
const ganacheOptions = {
|
||||
accounts: [
|
||||
{
|
||||
secretKey:
|
||||
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
|
||||
balance: convertToHexValue(25000000000000000000),
|
||||
},
|
||||
],
|
||||
concurrent: { port: 8546, chainId: 1338, ganacheOptions2: {} },
|
||||
};
|
||||
|
||||
it('should successfully change the network in response to wallet_switchEthereumChain', async function () {
|
||||
await withFixtures(
|
||||
{
|
||||
dapp: true,
|
||||
fixtures: new FixtureBuilder()
|
||||
.withPermissionControllerConnectedToTestDapp()
|
||||
.build(),
|
||||
ganacheOptions,
|
||||
title: this.test.title,
|
||||
failOnConsoleError: false,
|
||||
},
|
||||
async ({ driver }) => {
|
||||
await driver.navigate();
|
||||
await driver.fill('#password', 'correct horse battery staple');
|
||||
await driver.press('#password', driver.Key.ENTER);
|
||||
|
||||
const windowHandles = await driver.getAllWindowHandles();
|
||||
const extension = windowHandles[0];
|
||||
|
||||
await driver.openNewPage('http://127.0.0.1:8080/');
|
||||
|
||||
await driver.clickElement({
|
||||
tag: 'button',
|
||||
text: 'Add Localhost 8546',
|
||||
});
|
||||
|
||||
await driver.waitUntilXWindowHandles(3);
|
||||
|
||||
await driver.switchToWindowWithTitle(
|
||||
'MetaMask Notification',
|
||||
windowHandles,
|
||||
);
|
||||
|
||||
await driver.clickElement({
|
||||
tag: 'button',
|
||||
text: 'Approve',
|
||||
});
|
||||
|
||||
await driver.findElement({
|
||||
tag: 'h3',
|
||||
text: 'Allow this site to switch the network?',
|
||||
});
|
||||
|
||||
// Don't switch to network now, because we will click the 'Switch to Localhost 8546' button below
|
||||
await driver.clickElement({
|
||||
tag: 'button',
|
||||
text: 'Cancel',
|
||||
});
|
||||
|
||||
await driver.waitUntilXWindowHandles(2);
|
||||
|
||||
await driver.switchToWindowWithTitle('E2E Test Dapp', windowHandles);
|
||||
await driver.clickElement({
|
||||
tag: 'button',
|
||||
text: 'Switch to Localhost 8546',
|
||||
});
|
||||
|
||||
await driver.waitUntilXWindowHandles(3);
|
||||
|
||||
await driver.switchToWindowWithTitle(
|
||||
'MetaMask Notification',
|
||||
windowHandles,
|
||||
);
|
||||
|
||||
await driver.clickElement({
|
||||
tag: 'button',
|
||||
text: 'Switch network',
|
||||
});
|
||||
|
||||
await driver.waitUntilXWindowHandles(2);
|
||||
|
||||
await driver.switchToWindow(extension);
|
||||
|
||||
const currentNetworkName = await driver.findElement({
|
||||
tag: 'span',
|
||||
text: 'Localhost 8546',
|
||||
});
|
||||
|
||||
assert.ok(
|
||||
Boolean(currentNetworkName),
|
||||
'Failed to switch to custom network',
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
@ -61,10 +61,16 @@ function getActionFunctionById(id, history) {
|
||||
},
|
||||
16: () => {
|
||||
updateViewedNotifications({ 16: true });
|
||||
history.push(`${EXPERIMENTAL_ROUTE}#transaction-security-check`);
|
||||
},
|
||||
17: () => {
|
||||
updateViewedNotifications({ 17: true });
|
||||
},
|
||||
18: () => {
|
||||
updateViewedNotifications({ 18: true });
|
||||
history.push(`${EXPERIMENTAL_ROUTE}#transaction-security-check`);
|
||||
},
|
||||
19: () => {
|
||||
updateViewedNotifications({ 19: true });
|
||||
history.push(`${EXPERIMENTAL_ROUTE}#autodetect-nfts`);
|
||||
},
|
||||
};
|
||||
@ -266,8 +272,8 @@ export default function WhatsNewPopup({ onClose }) {
|
||||
const notification = getTranslatedUINotifications(t, locale)[id];
|
||||
const isLast = index === notifications.length - 1;
|
||||
// Display the swaps notification with full image
|
||||
// Displays the NFTs & OpenSea notifications 16,17 with full image
|
||||
return index === 0 || id === 1 || id === 16 || id === 17
|
||||
// Displays the NFTs & OpenSea notifications 18,19 with full image
|
||||
return index === 0 || id === 1 || id === 18 || id === 19
|
||||
? renderFirstNotification(notification, idRefMap, history, isLast)
|
||||
: renderSubsequentNotification(
|
||||
notification,
|
||||
|
@ -963,8 +963,10 @@ function getAllowedAnnouncementIds(state) {
|
||||
13: false,
|
||||
14: false,
|
||||
15: false,
|
||||
16: true,
|
||||
17: true,
|
||||
16: false,
|
||||
17: false,
|
||||
18: true,
|
||||
19: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user