1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Merge branch 'develop' into sync-master

This commit is contained in:
Mark Stacey 2022-10-31 13:51:53 -02:30 committed by GitHub
commit f8e01a0690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 1147 additions and 13244 deletions

3
.iyarc
View File

@ -1,5 +1,2 @@
# improved-yarn-audit advisory exclusions
GHSA-93q8-gq69-wqmw
GHSA-257v-vj4p-3w2h
GHSA-wm7h-9275-46v2
GHSA-pfrx-2q88-qq97

View File

@ -1383,12 +1383,6 @@ const state = {
},
},
},
threeBoxSyncingAllowed: false,
showRestorePrompt: true,
threeBoxLastUpdated: 0,
threeBoxAddress: null,
threeBoxSynced: false,
threeBoxDisabled: false,
swapsState: {
quotes: {},
fetchParams: null,
@ -1479,8 +1473,6 @@ const state = {
},
networksTabSelectedRpcUrl: '',
loadingMethodData: false,
show3BoxModalAfterImport: false,
threeBoxLastUpdated: null,
requestAccountTabs: {},
openMetaMaskTabs: {},
currentWindowTab: {},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Daten"
},
"dataBackupFoundInfo": {
"message": "Einige Ihrer Kontodaten wurden während einer früheren MetaMask-Installation gesichert. Dies könnte Ihre Einstellungen, Kontakte und Token umfassen. Möchten Sie diese Daten jetzt wiederherstellen?"
},
"dataBackupSeemsCorrupt": {
"message": "Ihre Daten konnten nicht wiederhergestellt werden. Die Datei scheint beschädigt zu sein."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Sie können die Benutzereinstellungen, die bevorzugte Einstellungen und Kontoadressen umfassen, aus einer vormals gesicherten JSON-Datei wiederherstellen."
},
"restoreWalletPreferences": {
"message": "$1 hat ein Backup Ihrer Daten gefunden. Möchten Sie die Präferenzen Ihrer Wallet wiederherstellen?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Transaktion wiederholen"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Mit Mobilgerät synchronisieren"
},
"syncWithThreeBox": {
"message": "Daten mit 3Box synchronisieren (experimentell)"
},
"syncWithThreeBoxDescription": {
"message": "Aktivieren Sie, um Ihre Einstellungen mit 3Box zu sichern. Diese Funktion ist derzeit experimentell; verwenden Sie diese auf eigene Gefahr."
},
"syncWithThreeBoxDisabled": {
"message": "3Box wurde aufgrund eines Fehlers während der ersten Synchronisation deaktiviert"
},
"tenPercentIncreased": {
"message": "10% Erhöhung"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Δεδομένα"
},
"dataBackupFoundInfo": {
"message": "Ορισμένα από τα δεδομένα του λογαριασμού σας δημιουργήθηκαν σε προηγούμενη εγκατάσταση του MetaMask. Αυτό θα μπορούσε να περιλαμβάνει τις ρυθμίσεις, τις επαφές και τα διακριτικά σας. Θα θέλατε να επαναφέρετε αυτά τα δεδομένα τώρα;"
},
"dataBackupSeemsCorrupt": {
"message": "Δεν μπορείτε να επαναφέρετε τα δεδομένα σας. Το αρχείο φαίνεται να είναι κατεστραμμένο."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Μπορείτε να επαναφέρετε τις ρυθμίσεις χρήστη που περιλαμβάνουν τις προτιμήσεις και τις διευθύνσεις λογαριασμών από ένα αρχείο JSON για το οποίο έχει δημιουργηθεί στο παρελθόν αντίγραφο ασφαλείας."
},
"restoreWalletPreferences": {
"message": "Βρέθηκε ένα αντίγραφο ασφαλείας των δεδομένων σας από το $1. Θα θέλατε να επαναφέρετε τις προτιμήσεις του πορτοφολιού σας;",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Επανάληψη Συναλλαγής"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Συγχρονισμός με κινητό"
},
"syncWithThreeBox": {
"message": "Συγχρονισμός δεδομένων με 3Box (πειραματικό)"
},
"syncWithThreeBoxDescription": {
"message": "Ενεργοποιήστε για να δημιουργηθούν αντίγραφα ασφαλείας των ρυθμίσεων σας με το 3Box. Αυτή η λειτουργία είναι επί του παρόντος πειραματική. Χρησιμοποιήστε τη με δική σας ευθύνη."
},
"syncWithThreeBoxDisabled": {
"message": "Το 3Box έχει απενεργοποιηθεί λόγω σφάλματος κατά τον αρχικό συγχρονισμό"
},
"tenPercentIncreased": {
"message": "10% αύξηση"
},

View File

@ -896,9 +896,6 @@
"data": {
"message": "Data"
},
"dataBackupFoundInfo": {
"message": "Some of your account data was backed up during a previous installation of MetaMask. This could include your settings, contacts, and tokens. Would you like to restore this data now?"
},
"dataBackupSeemsCorrupt": {
"message": "Can not restore your data. The file appears to be corrupt."
},
@ -2902,10 +2899,6 @@
"restoreUserDataDescription": {
"message": "You can restore user settings containing preferences and account addresses from a previously backed up JSON file."
},
"restoreWalletPreferences": {
"message": "A backup of your data from $1 has been found. Would you like to restore your wallet preferences?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Retry transaction"
},
@ -3891,15 +3884,6 @@
"syncWithMobileTitle": {
"message": "Sync with mobile"
},
"syncWithThreeBox": {
"message": "Sync data with 3Box (experimental)"
},
"syncWithThreeBoxDescription": {
"message": "Turn on to have your settings backed up with 3Box. This feature is currently experimental; use at your own risk."
},
"syncWithThreeBoxDisabled": {
"message": "3Box has been disabled due to an error during the initial sync"
},
"tenPercentIncreased": {
"message": "10% increase"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Datos"
},
"dataBackupFoundInfo": {
"message": "Se crearon copias de seguridad de algunos de los datos de la cuenta durante una instalación anterior de MetaMask. Esto podría incluir configuraciones, contactos y tokens. ¿Le gustaría restaurar estos datos ahora?"
},
"dataBackupSeemsCorrupt": {
"message": "No se pueden restaurar sus datos. El archivo parece estar corrupto."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Puede restaurar la configuración del usuario que contiene preferencias y direcciones de cuenta desde en un archivo JSON previamente respaldado."
},
"restoreWalletPreferences": {
"message": "Se encontró una copia de seguridad de los datos de $1. ¿Desea restaurar las preferencias de cartera?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Reintentar transacción"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Sincronizar con dispositivo móvil"
},
"syncWithThreeBox": {
"message": "Sincronizar datos con 3Box (experimental)"
},
"syncWithThreeBoxDescription": {
"message": "Active esta opción para crear una copia de seguridad de la configuración con 3Box. Actualmente, esta función es experimental. Úsela bajo su propio riesgo."
},
"syncWithThreeBoxDisabled": {
"message": "3Box se deshabilitó debido a un error durante la sincronización inicial"
},
"tenPercentIncreased": {
"message": "10% de aumento"
},

View File

@ -627,9 +627,6 @@
"data": {
"message": "Datos"
},
"dataBackupFoundInfo": {
"message": "Se crearon copias de seguridad de algunos de los datos de la cuenta durante una instalación anterior de MetaMask. Esto podría incluir configuraciones, contactos y tokens. ¿Quiere restaurar estos datos ahora?"
},
"dataHex": {
"message": "Hex"
},
@ -2188,10 +2185,6 @@
"restore": {
"message": "Restaurar"
},
"restoreWalletPreferences": {
"message": "Se encontró una copia de seguridad de los datos de $1. ¿Desea restaurar las preferencias de cartera?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Reintentar transacción"
},
@ -2903,15 +2896,6 @@
"syncWithMobileTitle": {
"message": "Sincronizar con dispositivo móvil"
},
"syncWithThreeBox": {
"message": "Sincronizar datos con 3Box (experimental)"
},
"syncWithThreeBoxDescription": {
"message": "Active esta opción para crear una copia de seguridad de la configuración con 3Box. Actualmente, esta función es experimental. Úsela bajo su propio riesgo."
},
"syncWithThreeBoxDisabled": {
"message": "3Box se deshabilitó debido a un error durante la sincronización inicial"
},
"tenPercentIncreased": {
"message": "10% de aumento"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Données"
},
"dataBackupFoundInfo": {
"message": "Certaines données de votre compte ont été sauvegardées lors dune précédente installation de MetaMask. Il peut sagir de vos paramètres, contacts et jetons. Souhaitez-vous restaurer ces données maintenant?"
},
"dataBackupSeemsCorrupt": {
"message": "Impossible de restaurer vos données. Le fichier semble corrompu."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Vous pouvez restaurer les paramètres de lutilisateur qui contiennent les préférences et les adresses de compte à partir dun fichier JSON précédemment sauvegardé."
},
"restoreWalletPreferences": {
"message": "Une sauvegarde de vos données de $1 a été trouvée. Voulez-vous restaurer vos préférences de portefeuille?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Retenter la transaction"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Synchroniser avec le mobile"
},
"syncWithThreeBox": {
"message": "Synchronisation des données avec 3Box (expérimental)"
},
"syncWithThreeBoxDescription": {
"message": "Activez cette fonction pour que vos paramètres soient sauvegardés avec 3Box. Cette fonction est actuellement expérimentale; utilisez-la avec prudence."
},
"syncWithThreeBoxDisabled": {
"message": "3Box a été désactivé en raison dune erreur lors de la synchronisation initiale"
},
"tenPercentIncreased": {
"message": "Augmentation de 10 %"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "डेटा"
},
"dataBackupFoundInfo": {
"message": "MetaMask की पिछली स्थापना के दौरान आपके कुछ खाता डेटा का बैकअप लिया गया था। इसमें आपकी सेटिंग, संपर्क और टोकन शामिल हो सकते हैं। क्या आप अब इस डेटा को पुनर्स्थापित करना चाहेंगे?"
},
"dataBackupSeemsCorrupt": {
"message": "आपका डेटा रीस्टोर नहीं किया जा सकता। लगता है फ़ाइल करप्ट हुई है।"
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "वरीयताएँ और अकाउंट एड्रेस से युक्त यूजर सेटिंग्स को आप पहले से बैकअप की गई JSON फ़ाइल से रीस्टोर सकते हैं।"
},
"restoreWalletPreferences": {
"message": "$1 से आपके डेटा का बैकअप मिला है। क्या आप अपनी वॉलेट वरीयताओं को पुनर्स्थापित करना चाहते हैं?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "लेनदेन का पुनः प्रयास करें"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "मोबाइल के साथ सिंक करें"
},
"syncWithThreeBox": {
"message": "3Box के साथ डेटा सिंक करें (प्रयोगात्मक)"
},
"syncWithThreeBoxDescription": {
"message": "3Box के साथ अपनी सेटिंग का बैकअप लेने के लिए चालू करें। यह सुविधा वर्तमान में प्रयोगात्मक है; अपने जोखिम पर इस्तेमाल करें।"
},
"syncWithThreeBoxDisabled": {
"message": "प्रारंभिक सिंक के दौरान एक त्रुटि के कारण 3Box को अक्षम कर दिया गया है"
},
"tenPercentIncreased": {
"message": "10% बढ़ोत्तरी"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Data"
},
"dataBackupFoundInfo": {
"message": "Beberapa data akun Anda telah dicadangkan selama pemasangan MetaMask yang lalu. Ini bisa mencakup pengaturan, kontak, dan token Anda. Apakah Anda ingin memulihkan data ini sekarang?"
},
"dataBackupSeemsCorrupt": {
"message": "Tidak dapat memulihkan data Anda. File tampaknya rusak."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Anda dapat memulihkan pengaturan pengguna yang berisi preferensi dan alamat akun dari berkas JSON yang dicadangkan sebelumnya."
},
"restoreWalletPreferences": {
"message": "Cadangan data Anda dari $1 telah ditemukan. Pulihkan preferensi dompet Anda?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Coba lagi transaksi"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Sinkronkan dengan seluler"
},
"syncWithThreeBox": {
"message": "Sinkronkan data dengan 3Box (eksperimen)"
},
"syncWithThreeBoxDescription": {
"message": "Aktifkan agar pengaturan Anda dicadangkan dengan 3Box. Fitur ini sekarang sedang dalam masa percobaan; risiko ditanggung sendiri."
},
"syncWithThreeBoxDisabled": {
"message": "3Box telah dinonaktifkan karena terjadi galat selama sinkronisasi awal"
},
"tenPercentIncreased": {
"message": "Meningkat 10%"
},

View File

@ -361,9 +361,6 @@
"customToken": {
"message": "Token Personalizzato"
},
"dataBackupFoundInfo": {
"message": "Alcuni dati sul tuo account sono state salvate durante una installazione precedente di MetaMask. Questi includono le impostazioni, i contatti, e i token. Vuoi ripristinare questi dati?"
},
"decimal": {
"message": "Precisione Decimali"
},
@ -1100,10 +1097,6 @@
"restore": {
"message": "Ripristina"
},
"restoreWalletPreferences": {
"message": "È stato trovato un backup dei tuoi dati da $1. Vuoi ripristinare le preferenze del portafoglio?",
"description": "$1 is the date at which the data was backed up"
},
"reusedTokenNameWarning": {
"message": "Un token usa un simbolo già usato da un altro token, ciò può confondere o ingannare."
},
@ -1533,15 +1526,6 @@
"syncWithMobileTitle": {
"message": "Sincronizza con dispositivo mobile"
},
"syncWithThreeBox": {
"message": "Sincronizza dati con 3Box (sperimentale)"
},
"syncWithThreeBoxDescription": {
"message": "Attiva per avere le tue impostazioni salvate su 3Box. Questa funzionalità è attualmente sperimentale; usala a tuo rischio."
},
"syncWithThreeBoxDisabled": {
"message": "3Box è stato disabilitato a causa di un errore durante la sincronizzazione iniziale"
},
"terms": {
"message": "Termini di Uso"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "データ"
},
"dataBackupFoundInfo": {
"message": "一部のアカウントデータはMetaMaskの前回のインストール時にバックアップされました。これには、設定、連絡先、およびトークンが含まれている可能性があります。このデータを今すぐ復元しますか?"
},
"dataBackupSeemsCorrupt": {
"message": "データを復元できません。ファイルが破損しているようです。"
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "以前バックアップされた JSON ファイルから、設定とアカウントアドレスを含むユーザー設定を復元できます。"
},
"restoreWalletPreferences": {
"message": "$1のデータのバックアップが見つかりました。ウォレットの基本設定を復元しますか?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "トランザクションを再試行"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "モバイルと同期"
},
"syncWithThreeBox": {
"message": "データを3Boxと同期 (試験的機能)"
},
"syncWithThreeBoxDescription": {
"message": "これをオンにすると、設定が3Boxでバックアップされます。この機能は現在試験段階にあります。自己責任でご利用ください。"
},
"syncWithThreeBoxDisabled": {
"message": "3Boxは、最初の同期中のエラーのため、無効化されました"
},
"tenPercentIncreased": {
"message": "10% の増加"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "데이터"
},
"dataBackupFoundInfo": {
"message": "일부 계정 데이터가 이전의 MetaMask 설치 도중에 백업되었습니다. 여기에는 설정, 연락처, 토큰이 포함될 수 있습니다. 지금 이 데이터를 복구할까요?"
},
"dataBackupSeemsCorrupt": {
"message": "사용자 데이터를 복원할 수 없습니다. 파일이 손상된 것 같습니다."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "이전에 백업한 JSON 파일에서 기본 설정과 계정 주소가 포함된 사용자 설정을 복원할 수 있습니다."
},
"restoreWalletPreferences": {
"message": "$1의 데이터 백업이 발견되었습니다. 지갑 환경설정을 복원할까요?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "트랜잭션 재시도"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "모바일과 동기화"
},
"syncWithThreeBox": {
"message": "3Box로 데이터 동기화(실험적 기능)"
},
"syncWithThreeBoxDescription": {
"message": "이 기능을 켜면 3Box를 이용해 설정을 백업합니다. 현재 실험 중인 기능이므로 본인의 책임 하에 사용해야 합니다."
},
"syncWithThreeBoxDisabled": {
"message": "초기 동기화 도중 오류가 발생하여 3Box가 비활성화되었습니다."
},
"tenPercentIncreased": {
"message": "10% 인상"
},

View File

@ -430,9 +430,6 @@
"customToken": {
"message": "Custom na Token"
},
"dataBackupFoundInfo": {
"message": "Ang ilan sa data ng iyong account ay na-back up sa nakaraang pag-install ng MetaMask. Maaaring kasama rito ang iyong mga setting, contact, at token. Gusto mo na bang i-restore ang data na ito ngayon?"
},
"decimal": {
"message": "Decimal ng Token"
},
@ -1380,10 +1377,6 @@
"restore": {
"message": "I-restore"
},
"restoreWalletPreferences": {
"message": "Nakita ang backup ng iyong data mula sa $1. Gusto mo bang i-restore ang mga kagustuhan mo sa wallet?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Subukan Ulit ang Transaksyon"
},
@ -1952,15 +1945,6 @@
"syncWithMobileTitle": {
"message": "I-sync sa mobile"
},
"syncWithThreeBox": {
"message": "I-sync ang data sa 3Box (pinag-eeksperimentuhan)"
},
"syncWithThreeBoxDescription": {
"message": "I-on para ma-back up ang iyong mga setting sa 3Box. Kasalukuyang pinag-eeksperimentuhan ang feature na ito; gamitin sa sarili mong pagpapasya."
},
"syncWithThreeBoxDisabled": {
"message": "Na-disable ang 3Box dahil sa isang error sa unang pag-sync"
},
"terms": {
"message": "Mga Tuntunin ng Paggamit"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Dados"
},
"dataBackupFoundInfo": {
"message": "Foi feito o backup de alguns dos dados da sua conta durante uma instalação anterior da MetaMask. Isso pode incluir configurações, contatos e tokens. Gostaria de restaurar esses dados agora?"
},
"dataBackupSeemsCorrupt": {
"message": "Não é possível restaurar seus dados. O arquivo parece estar corrompido."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Você pode restaurar as configurações do usuário contendo preferências e endereços de contas a partir de um arquivo de backup JSON."
},
"restoreWalletPreferences": {
"message": "Encontramos um backup dos seus dados de $1. Gostaria de restaurar as preferências da sua carteira?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Tentar transação novamente"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Sincronizar com dispositivo móvel"
},
"syncWithThreeBox": {
"message": "Sincronizar dados com 3Box (experimental)"
},
"syncWithThreeBoxDescription": {
"message": "Ative para fazer backup das suas configurações com o 3Box. Esse recurso é experimental; use por sua conta e risco."
},
"syncWithThreeBoxDisabled": {
"message": "O 3Box foi desabilitado por conta de um erro durante a sincronização inicial"
},
"tenPercentIncreased": {
"message": "10% de aumento"
},

View File

@ -627,9 +627,6 @@
"data": {
"message": "Dados"
},
"dataBackupFoundInfo": {
"message": "Foi feito o backup de alguns dos dados da sua conta durante uma instalação anterior da MetaMask. Isso pode incluir configurações, contatos e tokens. Gostaria de restaurar esses dados agora?"
},
"dataHex": {
"message": "Hex"
},
@ -2172,10 +2169,6 @@
"restore": {
"message": "Restaurar"
},
"restoreWalletPreferences": {
"message": "Encontramos um backup dos seus dados de $1. Gostaria de restaurar as preferências da sua carteira?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Tentar transação novamente"
},
@ -2887,15 +2880,6 @@
"syncWithMobileTitle": {
"message": "Sincronizar com dispositivo móvel"
},
"syncWithThreeBox": {
"message": "Sincronizar dados com 3Box (experimental)"
},
"syncWithThreeBoxDescription": {
"message": "Ative para fazer backup das suas configurações com o 3Box. Esse recurso é experimental; use por sua conta e risco."
},
"syncWithThreeBoxDisabled": {
"message": "O 3Box foi desabilitado por conta de um erro durante a sincronização inicial"
},
"tenPercentIncreased": {
"message": "10% de aumento"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Данные"
},
"dataBackupFoundInfo": {
"message": "Некоторые данные вашего счета были скопированы во время предыдущей установки MetaMask. Они могли включать ваши настройки, контакты и токены. Хотите восстановить эти данные сейчас?"
},
"dataBackupSeemsCorrupt": {
"message": "Не удается восстановить ваши данные. Файл, по-видимому, поврежден."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Вы можете восстановить пользовательские настройки, содержащие настройки и адреса аккаунтов, из ранее сохраненного файла JSON."
},
"restoreWalletPreferences": {
"message": "Найдена резервная копия ваших данных из $1. Хотите восстановить настройки кошелька?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Повторить транзакцию"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Синхронизировать с мобильным устройством"
},
"syncWithThreeBox": {
"message": "Синхронизировать данные с 3Box (экспериментальная функция)"
},
"syncWithThreeBoxDescription": {
"message": "Включите, чтобы скопировать ваши настройки с помощью 3Box. Эта функция в настоящее время является экспериментальной. Используйте ее на свой страх и риск."
},
"syncWithThreeBoxDisabled": {
"message": "3Box отключен из-за ошибки во время первоначальной синхронизации"
},
"tenPercentIncreased": {
"message": "Увеличение на 10%"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Datos"
},
"dataBackupFoundInfo": {
"message": "Ang ilan sa data ng iyong account ay na-back up sa nakaraang pag-install ng MetaMask. Maaaring kasama rito ang iyong mga setting, contact, at token. Gusto mo bang i-restore na ang data na ito?"
},
"dataBackupSeemsCorrupt": {
"message": "Hindi maibalik ang iyong datos. Mukhang sira ang file."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Maaari mong ibalik ang mga setting ng user na naglalaman ng mga kagustuhan at mga address ng account mula sa isang dating na-back up na JSON file."
},
"restoreWalletPreferences": {
"message": "Nakita ang backup ng iyong data mula sa $1. Gusto mo bang i-restore ang mga kagustuhan mo sa wallet?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Subukan Ulit ang Transaksyon"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "I-sync sa mobile"
},
"syncWithThreeBox": {
"message": "I-sync ang data sa 3Box (pinag-eeksperimentuhan)"
},
"syncWithThreeBoxDescription": {
"message": "I-on para ma-back up ang iyong mga setting sa 3Box. Kasalukuyang pinag-eeksperimentuhan ang feature na ito; gamitin sa sarili mong pagpapasya."
},
"syncWithThreeBoxDisabled": {
"message": "Na-disable ang 3Box dahil sa isang error sa unang pag-sync"
},
"tenPercentIncreased": {
"message": "10% na dagdag"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Veri"
},
"dataBackupFoundInfo": {
"message": "MetaMask'ın önceki bir kurulumu sırasında hesap verilerinizden bazıları yedeklenmiştir. Buna ayarlar, kişiler ve tokenler dahil olabilir. Bu verileri şimdi geri yüklemek ister misiniz?"
},
"dataBackupSeemsCorrupt": {
"message": "Verileriniz geri yüklenemedi. Dosyanın bozuk olduğu algılandı."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Tercihleri ve hesap adreslerini içeren kullanıcı ayarlarını daha önce yedeklenmiş bir JSON dosyasından geri yükleyebilirsiniz."
},
"restoreWalletPreferences": {
"message": "Verilerinizin $1 tarihinden bir yedeği bulundu. Cüzdan tercihlerinizi geri yüklemek ister misiniz?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "İşlemi Tekrar Dene"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Mobil ile senkronize et"
},
"syncWithThreeBox": {
"message": "Verileri 3Box ile senkronize et (deneysel)"
},
"syncWithThreeBoxDescription": {
"message": "Ayarlarınızın 3Box ile yedeklenmesini sağlamak için açın. Bu özellik şu anda deney aşamasındadır; kullanım riski size aittir."
},
"syncWithThreeBoxDisabled": {
"message": "İlk senkronizasyon işlemi sırasındaki bir hata nedeniyle 3Box devre dışı bırakıldı"
},
"tenPercentIncreased": {
"message": "%10 artış"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "Dữ liệu"
},
"dataBackupFoundInfo": {
"message": "Một số dữ liệu tài khoản của bạn đã được sao lưu trong lần cài đặt MetaMask trước đó. Dữ liệu này có thể bao gồm các tùy chọn cài đặt, danh bạ và token. Bạn có muốn khôi phục dữ liệu này bây giờ không?"
},
"dataBackupSeemsCorrupt": {
"message": "Không thể khôi phục dữ liệu của bạn. Tập tin có vẻ đã bị hỏng."
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "Bạn có thể khôi phục cài đặt người dùng chứa các tùy chọn và địa chỉ tài khoản từ tập tin JSON đã sao lưu trước đó."
},
"restoreWalletPreferences": {
"message": "Đã tìm thấy bản sao lưu dữ liệu của bạn từ $1. Bạn có muốn khôi phục các tùy chọn ưu tiên trong ví của mình không?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "Thử lại giao dịch"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "Đồng bộ với thiết bị di động"
},
"syncWithThreeBox": {
"message": "Đồng bộ dữ liệu với 3Box (thử nghiệm)"
},
"syncWithThreeBoxDescription": {
"message": "Bật để sao lưu các tùy chọn cài đặt của bạn với 3Box. Tính năng này hiện đang trong giai đoạn thử nghiệm; bạn tự chịu rủi ro khi sử dụng."
},
"syncWithThreeBoxDisabled": {
"message": "Đã tắt 3Box do có lỗi xảy ra trong quá trình đồng bộ ban đầu"
},
"tenPercentIncreased": {
"message": "Tăng 10%"
},

View File

@ -781,9 +781,6 @@
"data": {
"message": "数据"
},
"dataBackupFoundInfo": {
"message": "您的部分账户数据已在之前安装 MetaMask 时备份。其中可能包括您的设置、联系人和代币。您现在想恢复这些数据吗?"
},
"dataHex": {
"message": "十六进制"
},
@ -2687,10 +2684,6 @@
"restore": {
"message": "恢复"
},
"restoreWalletPreferences": {
"message": "已找到 $1 的数据备份。您想恢复您的钱包偏好设置吗?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "重试交易"
},
@ -3636,15 +3629,6 @@
"syncWithMobileTitle": {
"message": "与移动设备同步"
},
"syncWithThreeBox": {
"message": "与 3Box 同步数据(实验功能)"
},
"syncWithThreeBoxDescription": {
"message": "开启以使用 3Box 备份您的设置。此功能目前是实验功能,使用时风险自负。"
},
"syncWithThreeBoxDisabled": {
"message": "由于初始同步过程中出现错误3Box 已被禁用"
},
"tenPercentIncreased": {
"message": "增加10%"
},

View File

@ -878,9 +878,6 @@
"data": {
"message": "数据"
},
"dataBackupFoundInfo": {
"message": "您的部分账户数据已在之前安装 MetaMask 时备份。其中可能包括您的设置、联系人和代币。您现在想恢复这些数据吗?"
},
"dataBackupSeemsCorrupt": {
"message": "无法还原数据。文件似乎已损坏。"
},
@ -2865,10 +2862,6 @@
"restoreUserDataDescription": {
"message": "您可以使用以前备份的JSON文件来恢复包含首选项和账户地址的用户设置。"
},
"restoreWalletPreferences": {
"message": "已找到 $1 的数据备份。您想恢复您的钱包偏好设置吗?",
"description": "$1 is the date at which the data was backed up"
},
"retryTransaction": {
"message": "重试交易"
},
@ -3841,15 +3834,6 @@
"syncWithMobileTitle": {
"message": "与移动设备同步"
},
"syncWithThreeBox": {
"message": "与 3Box 同步数据(实验功能)"
},
"syncWithThreeBoxDescription": {
"message": "开启以使用 3Box 备份您的设置。此功能目前是实验功能,使用时风险自负。"
},
"syncWithThreeBoxDisabled": {
"message": "由于初始同步过程中出现错误3Box 已被禁用"
},
"tenPercentIncreased": {
"message": "增加10%"
},

View File

@ -714,7 +714,7 @@ export default class MetaMetricsController {
).length,
[TRAITS.NUMBER_OF_TOKENS]: this._getNumberOfTokens(metamaskState),
[TRAITS.OPENSEA_API_ENABLED]: metamaskState.openSeaEnabled,
[TRAITS.THREE_BOX_ENABLED]: metamaskState.threeBoxSyncingAllowed,
[TRAITS.THREE_BOX_ENABLED]: false, // deprecated, hard-coded as false
[TRAITS.THEME]: metamaskState.theme || 'default',
[TRAITS.TOKEN_DETECTION_ENABLED]: metamaskState.useTokenDetection,
};

View File

@ -675,7 +675,6 @@ describe('MetaMetricsController', function () {
identities: [{}, {}],
ledgerTransportType: 'web-hid',
openSeaEnabled: true,
threeBoxSyncingAllowed: false,
useCollectibleDetection: false,
theme: 'default',
useTokenDetection: true,
@ -714,7 +713,6 @@ describe('MetaMetricsController', function () {
ledgerTransportType: 'web-hid',
openSeaEnabled: true,
identities: [{}, {}],
threeBoxSyncingAllowed: false,
useCollectibleDetection: false,
theme: 'default',
useTokenDetection: true,
@ -735,7 +733,6 @@ describe('MetaMetricsController', function () {
ledgerTransportType: 'web-hid',
openSeaEnabled: false,
identities: [{}, {}, {}],
threeBoxSyncingAllowed: false,
useCollectibleDetection: false,
theme: 'default',
useTokenDetection: true,
@ -764,7 +761,6 @@ describe('MetaMetricsController', function () {
ledgerTransportType: 'web-hid',
openSeaEnabled: true,
identities: [{}, {}],
threeBoxSyncingAllowed: false,
useCollectibleDetection: true,
theme: 'default',
useTokenDetection: true,
@ -783,7 +779,6 @@ describe('MetaMetricsController', function () {
ledgerTransportType: 'web-hid',
openSeaEnabled: true,
identities: [{}, {}],
threeBoxSyncingAllowed: false,
useCollectibleDetection: true,
theme: 'default',
useTokenDetection: true,

View File

@ -1,305 +0,0 @@
import { ObservableStore } from '@metamask/obs-store';
/* eslint-disable import/first,import/order */
const Box = process.env.IN_TEST
? require('../../../development/mock-3box')
: require('3box');
/* eslint-enable import/order */
import log from 'loglevel';
import { JsonRpcEngine } from 'json-rpc-engine';
import { providerFromEngine } from 'eth-json-rpc-middleware';
import Migrator from '../lib/migrator';
import migrations from '../migrations';
import createOriginMiddleware from '../lib/createOriginMiddleware';
import createMetamaskMiddleware from './network/createMetamaskMiddleware';
/* eslint-enable import/first */
const SYNC_TIMEOUT = 60 * 1000; // one minute
export default class ThreeBoxController {
constructor(opts = {}) {
const {
preferencesController,
keyringController,
addressBookController,
version,
getKeyringControllerState,
trackMetaMetricsEvent,
} = opts;
this.preferencesController = preferencesController;
this.addressBookController = addressBookController;
this.keyringController = keyringController;
this.provider = this._createProvider({
version,
getAccounts: async ({ origin }) => {
if (origin !== '3Box') {
return [];
}
const { isUnlocked } = getKeyringControllerState();
const accounts = await this.keyringController.getAccounts();
if (isUnlocked && accounts[0]) {
const appKeyAddress = await this.keyringController.getAppKeyAddress(
accounts[0],
'wallet://3box.metamask.io',
);
return [appKeyAddress];
}
return [];
},
processPersonalMessage: async (msgParams) => {
const accounts = await this.keyringController.getAccounts();
return keyringController.signPersonalMessage(
{ ...msgParams, from: accounts[0] },
{
withAppKeyOrigin: 'wallet://3box.metamask.io',
},
);
},
});
this._trackMetaMetricsEvent = trackMetaMetricsEvent;
const initState = {
threeBoxSyncingAllowed: false,
showRestorePrompt: true,
threeBoxLastUpdated: 0,
...opts.initState,
threeBoxAddress: null,
threeBoxSynced: false,
threeBoxDisabled: false,
};
this.store = new ObservableStore(initState);
this.registeringUpdates = false;
this.lastMigration = migrations
.sort((a, b) => a.version - b.version)
.slice(-1)[0];
if (initState.threeBoxSyncingAllowed) {
this.init();
}
}
async init() {
const accounts = await this.keyringController.getAccounts();
this.address = accounts[0];
this._trackMetaMetricsEvent({
event: '3Box Initiated',
category: '3Box',
});
if (this.address && !(this.box && this.store.getState().threeBoxSynced)) {
await this.new3Box();
}
}
async _update3Box() {
try {
const { threeBoxSyncingAllowed, threeBoxSynced } = this.store.getState();
if (threeBoxSyncingAllowed && threeBoxSynced) {
const newState = {
preferences: this.preferencesController.store.getState(),
addressBook: this.addressBookController.state,
lastUpdated: Date.now(),
lastMigration: this.lastMigration,
};
await this.space.private.set(
'metamaskBackup',
JSON.stringify(newState),
);
await this.setShowRestorePromptToFalse();
}
} catch (error) {
console.error(error);
}
}
_createProvider(providerOpts) {
const metamaskMiddleware = createMetamaskMiddleware(providerOpts);
const engine = new JsonRpcEngine();
engine.push(createOriginMiddleware({ origin: '3Box' }));
engine.push(metamaskMiddleware);
const provider = providerFromEngine(engine);
return provider;
}
_waitForOnSyncDone() {
return new Promise((resolve) => {
this.box.onSyncDone(() => {
log.debug('3Box box sync done');
return resolve();
});
});
}
async new3Box() {
const accounts = await this.keyringController.getAccounts();
this.address = await this.keyringController.getAppKeyAddress(
accounts[0],
'wallet://3box.metamask.io',
);
let backupExists;
try {
const threeBoxConfig = await Box.getConfig(this.address);
backupExists = threeBoxConfig.spaces && threeBoxConfig.spaces.metamask;
} catch (e) {
if (e.message.match(/^Error: Invalid response \(404\)/u)) {
this._trackMetaMetricsEvent({
event: '3Box Backup does not exist',
category: '3Box',
});
backupExists = false;
} else {
this._trackMetaMetricsEvent({
event: '3Box Config Error',
category: '3Box',
});
throw e;
}
}
if (this.getThreeBoxSyncingState() || backupExists) {
this.store.updateState({ threeBoxSynced: false });
let timedOut = false;
const syncTimeout = setTimeout(() => {
log.error(`3Box sync timed out after ${SYNC_TIMEOUT} ms`);
timedOut = true;
this.store.updateState({
threeBoxDisabled: true,
threeBoxSyncingAllowed: false,
});
}, SYNC_TIMEOUT);
try {
this.box = await Box.openBox(this.address, this.provider);
await this._waitForOnSyncDone();
this.space = await this.box.openSpace('metamask', {
onSyncDone: async () => {
const stateUpdate = {
threeBoxSynced: true,
threeBoxAddress: this.address,
};
if (timedOut) {
log.info(`3Box sync completed after timeout; no longer disabled`);
stateUpdate.threeBoxDisabled = false;
}
clearTimeout(syncTimeout);
this.store.updateState(stateUpdate);
log.debug('3Box space sync done');
this._trackMetaMetricsEvent({
event: '3Box Synced',
category: '3Box',
});
},
});
} catch (e) {
this._trackMetaMetricsEvent({
event: '3Box Initiation Error',
category: '3Box',
});
console.error(e);
throw e;
}
}
}
async getLastUpdated() {
const res = await this.space.private.get('metamaskBackup');
const parsedRes = JSON.parse(res || '{}');
return parsedRes.lastUpdated;
}
async migrateBackedUpState(backedUpState) {
const migrator = new Migrator({ migrations });
const { preferences, addressBook } = JSON.parse(backedUpState);
const formattedStateBackup = {
PreferencesController: preferences,
AddressBookController: addressBook,
};
const initialMigrationState =
migrator.generateInitialState(formattedStateBackup);
const migratedState = await migrator.migrateData(initialMigrationState);
return {
preferences: migratedState.data.PreferencesController,
addressBook: migratedState.data.AddressBookController,
};
}
async restoreFromThreeBox() {
const backedUpState = await this.space.private.get('metamaskBackup');
const { preferences, addressBook } = await this.migrateBackedUpState(
backedUpState,
);
this.store.updateState({ threeBoxLastUpdated: backedUpState.lastUpdated });
preferences && this.preferencesController.store.updateState(preferences);
addressBook && this.addressBookController.update(addressBook, true);
this.setShowRestorePromptToFalse();
this._trackMetaMetricsEvent({
event: '3Box Restored Data',
category: '3Box',
});
}
turnThreeBoxSyncingOn() {
this._trackMetaMetricsEvent({
event: '3Box Sync Turned On',
category: '3Box',
});
this._registerUpdates();
}
turnThreeBoxSyncingOff() {
this._trackMetaMetricsEvent({
event: '3Box Sync Turned Off',
category: '3Box',
});
this.box.logout();
}
setShowRestorePromptToFalse() {
this.store.updateState({ showRestorePrompt: false });
}
setThreeBoxSyncingPermission(newThreeboxSyncingState) {
if (this.store.getState().threeBoxDisabled) {
return;
}
this.store.updateState({
threeBoxSyncingAllowed: newThreeboxSyncingState,
});
if (newThreeboxSyncingState && this.box) {
this.turnThreeBoxSyncingOn();
}
if (!newThreeboxSyncingState && this.box) {
this.turnThreeBoxSyncingOff();
}
}
getThreeBoxSyncingState() {
return this.store.getState().threeBoxSyncingAllowed;
}
_registerUpdates() {
if (!this.registeringUpdates) {
const updatePreferences = this._update3Box.bind(this);
this.preferencesController.store.subscribe(updatePreferences);
const updateAddressBook = this._update3Box.bind(this);
this.addressBookController.subscribe(updateAddressBook);
this.registeringUpdates = true;
}
}
}

View File

@ -53,11 +53,6 @@ export const SENTRY_STATE = {
type: true,
},
seedPhraseBackedUp: true,
showRestorePrompt: true,
threeBoxDisabled: true,
threeBoxLastUpdated: true,
threeBoxSynced: true,
threeBoxSyncingAllowed: true,
unapprovedDecryptMsgCount: true,
unapprovedEncryptionPublicKeyMsgCount: true,
unapprovedMsgCount: true,

View File

@ -1,6 +1,11 @@
import { strict as assert } from 'assert';
import sinon from 'sinon';
import proxyquire from 'proxyquire';
import {
ApprovalRequestNotFoundError,
PermissionsRequestNotFoundError,
} from '@metamask/controllers';
import { ORIGIN_METAMASK } from '../../shared/constants/app';
const Ganache = require('../../test/e2e/ganache');
@ -238,4 +243,137 @@ describe('MetaMaskController', function () {
assert.deepEqual(transaction1, transaction2);
});
});
describe('#removePermissionsFor', function () {
it('should not propagate PermissionsRequestNotFoundError', function () {
const error = new PermissionsRequestNotFoundError('123');
metamaskController.permissionController = {
revokePermissions: () => {
throw error;
},
};
// Line below will not throw error, in case it throws this test case will fail.
metamaskController.removePermissionsFor({ subject: 'test_subject' });
});
it('should propagate Error other than PermissionsRequestNotFoundError', function () {
const error = new Error();
metamaskController.permissionController = {
revokePermissions: () => {
throw error;
},
};
assert.throws(() => {
metamaskController.removePermissionsFor({ subject: 'test_subject' });
}, error);
});
});
describe('#rejectPermissionsRequest', function () {
it('should not propagate PermissionsRequestNotFoundError', function () {
const error = new PermissionsRequestNotFoundError('123');
metamaskController.permissionController = {
rejectPermissionsRequest: () => {
throw error;
},
};
// Line below will not throw error, in case it throws this test case will fail.
metamaskController.rejectPermissionsRequest('DUMMY_ID');
});
it('should propagate Error other than PermissionsRequestNotFoundError', function () {
const error = new Error();
metamaskController.permissionController = {
rejectPermissionsRequest: () => {
throw error;
},
};
assert.throws(() => {
metamaskController.rejectPermissionsRequest('DUMMY_ID');
}, error);
});
});
describe('#acceptPermissionsRequest', function () {
it('should not propagate PermissionsRequestNotFoundError', function () {
const error = new PermissionsRequestNotFoundError('123');
metamaskController.permissionController = {
acceptPermissionsRequest: () => {
throw error;
},
};
// Line below will not throw error, in case it throws this test case will fail.
metamaskController.acceptPermissionsRequest('DUMMY_ID');
});
it('should propagate Error other than PermissionsRequestNotFoundError', function () {
const error = new Error();
metamaskController.permissionController = {
acceptPermissionsRequest: () => {
throw error;
},
};
assert.throws(() => {
metamaskController.acceptPermissionsRequest('DUMMY_ID');
}, error);
});
});
describe('#resolvePendingApproval', function () {
it('should not propagate ApprovalRequestNotFoundError', function () {
const error = new ApprovalRequestNotFoundError('123');
metamaskController.approvalController = {
accept: () => {
throw error;
},
};
// Line below will not throw error, in case it throws this test case will fail.
metamaskController.resolvePendingApproval('DUMMY_ID', 'DUMMY_VALUE');
});
it('should propagate Error other than ApprovalRequestNotFoundError', function () {
const error = new Error();
metamaskController.approvalController = {
accept: () => {
throw error;
},
};
assert.throws(() => {
metamaskController.resolvePendingApproval('DUMMY_ID', 'DUMMY_VALUE');
}, error);
});
});
describe('#rejectPendingApproval', function () {
it('should not propagate ApprovalRequestNotFoundError', function () {
const error = new ApprovalRequestNotFoundError('123');
metamaskController.approvalController = {
reject: () => {
throw error;
},
};
// Line below will not throw error, in case it throws this test case will fail.
metamaskController.rejectPendingApproval('DUMMY_ID', {
code: 1,
message: 'DUMMY_MESSAGE',
data: 'DUMMY_DATA',
});
});
it('should propagate Error other than ApprovalRequestNotFoundError', function () {
const error = new Error();
metamaskController.approvalController = {
reject: () => {
throw error;
},
};
assert.throws(() => {
metamaskController.rejectPendingApproval('DUMMY_ID', {
code: 1,
message: 'DUMMY_MESSAGE',
data: 'DUMMY_DATA',
});
}, error);
});
});
});

View File

@ -39,6 +39,8 @@ import {
CollectibleDetectionController,
PermissionController,
SubjectMetadataController,
PermissionsRequestNotFoundError,
ApprovalRequestNotFoundError,
///: BEGIN:ONLY_INCLUDE_IN(flask)
RateLimitController,
NotificationController,
@ -123,7 +125,6 @@ import AppStateController from './controllers/app-state';
import CachedBalancesController from './controllers/cached-balances';
import AlertController from './controllers/alert';
import OnboardingController from './controllers/onboarding';
import ThreeBoxController from './controllers/threebox';
import BackupController from './controllers/backup';
import IncomingTransactionsController from './controllers/incoming-transactions';
import MessageManager, { normalizeMsgData } from './lib/message-manager';
@ -772,20 +773,6 @@ export default class MetamaskController extends EventEmitter {
preferencesStore: this.preferencesController.store,
});
this.threeBoxController = new ThreeBoxController({
preferencesController: this.preferencesController,
addressBookController: this.addressBookController,
keyringController: this.keyringController,
initState: initState.ThreeBoxController,
getKeyringControllerState: this.keyringController.memStore.getState.bind(
this.keyringController.memStore,
),
version,
trackMetaMetricsEvent: this.metaMetricsController.trackEvent.bind(
this.metaMetricsController,
),
});
this.backupController = new BackupController({
preferencesController: this.preferencesController,
addressBookController: this.addressBookController,
@ -1043,7 +1030,6 @@ export default class MetamaskController extends EventEmitter {
PermissionController: this.permissionController,
PermissionLogController: this.permissionLogController.store,
SubjectMetadataController: this.subjectMetadataController,
ThreeBoxController: this.threeBoxController.store,
BackupController: this.backupController,
AnnouncementController: this.announcementController,
GasFeeController: this.gasFeeController,
@ -1082,7 +1068,6 @@ export default class MetamaskController extends EventEmitter {
PermissionController: this.permissionController,
PermissionLogController: this.permissionLogController.store,
SubjectMetadataController: this.subjectMetadataController,
ThreeBoxController: this.threeBoxController.store,
BackupController: this.backupController,
SwapsController: this.swapsController.store,
EnsController: this.ensController.store,
@ -1498,7 +1483,6 @@ export default class MetamaskController extends EventEmitter {
const {
addressBookController,
alertController,
approvalController,
appStateController,
collectiblesController,
collectibleDetectionController,
@ -1515,7 +1499,6 @@ export default class MetamaskController extends EventEmitter {
preferencesController,
qrHardwareKeyring,
swapsController,
threeBoxController,
tokensController,
smartTransactionsController,
txController,
@ -1804,32 +1787,10 @@ export default class MetamaskController extends EventEmitter {
setWeb3ShimUsageAlertDismissed:
alertController.setWeb3ShimUsageAlertDismissed.bind(alertController),
// 3Box
setThreeBoxSyncingPermission:
threeBoxController.setThreeBoxSyncingPermission.bind(
threeBoxController,
),
restoreFromThreeBox:
threeBoxController.restoreFromThreeBox.bind(threeBoxController),
setShowRestorePromptToFalse:
threeBoxController.setShowRestorePromptToFalse.bind(threeBoxController),
getThreeBoxLastUpdated:
threeBoxController.getLastUpdated.bind(threeBoxController),
turnThreeBoxSyncingOn:
threeBoxController.turnThreeBoxSyncingOn.bind(threeBoxController),
initializeThreeBox: this.initializeThreeBox.bind(this),
// permissions
removePermissionsFor:
permissionController.revokePermissions.bind(permissionController),
approvePermissionsRequest:
permissionController.acceptPermissionsRequest.bind(
permissionController,
),
rejectPermissionsRequest:
permissionController.rejectPermissionsRequest.bind(
permissionController,
),
removePermissionsFor: this.removePermissionsFor,
approvePermissionsRequest: this.acceptPermissionsRequest,
rejectPermissionsRequest: this.rejectPermissionsRequest,
...getPermissionBackgroundApiMethods(permissionController),
///: BEGIN:ONLY_INCLUDE_IN(flask)
@ -1947,14 +1908,8 @@ export default class MetamaskController extends EventEmitter {
),
// approval controller
resolvePendingApproval:
approvalController.accept.bind(approvalController),
rejectPendingApproval: async (id, error) => {
approvalController.reject(
id,
new EthereumRpcError(error.code, error.message, error.data),
);
},
resolvePendingApproval: this.resolvePendingApproval,
rejectPendingApproval: this.rejectPendingApproval,
// Notifications
updateViewedNotifications: announcementController.updateViewed.bind(
@ -2355,20 +2310,6 @@ export default class MetamaskController extends EventEmitter {
log.error('Error while unlocking extension.', error);
}
try {
const threeBoxSyncingAllowed =
this.threeBoxController.getThreeBoxSyncingState();
if (threeBoxSyncingAllowed && !this.threeBoxController.box) {
// 'await' intentionally omitted to avoid waiting for initialization
this.threeBoxController.init();
this.threeBoxController.turnThreeBoxSyncingOn();
} else if (threeBoxSyncingAllowed && this.threeBoxController.box) {
this.threeBoxController.turnThreeBoxSyncingOn();
}
} catch (error) {
log.error('Error while unlocking extension.', error);
}
// This must be set as soon as possible to communicate to the
// keyring's iframe and have the setting initialized properly
// Optimistically called to not block MetaMask login due to
@ -4244,10 +4185,6 @@ export default class MetamaskController extends EventEmitter {
return null;
}
async initializeThreeBox() {
await this.threeBoxController.init();
}
/**
* Sets the Ledger Live preference to use for Ledger hardware wallet support
*
@ -4361,4 +4298,57 @@ export default class MetamaskController extends EventEmitter {
return this.keyringController.setLocked();
}
removePermissionsFor = (subjects) => {
try {
this.permissionController.revokePermissions(subjects);
} catch (exp) {
if (!(exp instanceof PermissionsRequestNotFoundError)) {
throw exp;
}
}
};
rejectPermissionsRequest = (requestId) => {
try {
this.permissionController.rejectPermissionsRequest(requestId);
} catch (exp) {
if (!(exp instanceof PermissionsRequestNotFoundError)) {
throw exp;
}
}
};
acceptPermissionsRequest = (request) => {
try {
this.permissionController.acceptPermissionsRequest(request);
} catch (exp) {
if (!(exp instanceof PermissionsRequestNotFoundError)) {
throw exp;
}
}
};
resolvePendingApproval = (id, value) => {
try {
this.approvalController.accept(id, value);
} catch (exp) {
if (!(exp instanceof ApprovalRequestNotFoundError)) {
throw exp;
}
}
};
rejectPendingApproval = (id, error) => {
try {
this.approvalController.reject(
id,
new EthereumRpcError(error.code, error.message, error.data),
);
} catch (exp) {
if (!(exp instanceof ApprovalRequestNotFoundError)) {
throw exp;
}
}
};
}

View File

@ -49,36 +49,6 @@ const firstTimeState = {
const ganacheServer = new Ganache();
const threeBoxSpies = {
_registerUpdates: sinon.spy(),
init: sinon.stub(),
getLastUpdated: sinon.stub(),
getThreeBoxSyncingState: sinon.stub().returns(true),
restoreFromThreeBox: sinon.stub(),
setShowRestorePromptToFalse: sinon.stub(),
setThreeBoxSyncingPermission: sinon.stub(),
turnThreeBoxSyncingOn: sinon.stub(),
};
class ThreeBoxControllerMock {
constructor() {
this._registerUpdates = threeBoxSpies._registerUpdates;
this.init = threeBoxSpies.init;
this.getLastUpdated = threeBoxSpies.getLastUpdated;
this.getThreeBoxSyncingState = threeBoxSpies.getThreeBoxSyncingState;
this.restoreFromThreeBox = threeBoxSpies.restoreFromThreeBox;
this.setShowRestorePromptToFalse =
threeBoxSpies.setShowRestorePromptToFalse;
this.setThreeBoxSyncingPermission =
threeBoxSpies.setThreeBoxSyncingPermission;
this.store = {
subscribe: () => undefined,
getState: () => ({}),
};
this.turnThreeBoxSyncingOn = threeBoxSpies.turnThreeBoxSyncingOn;
}
}
const browserPolyfillMock = {
runtime: {
id: 'fake-extension-id',
@ -116,7 +86,6 @@ const createLoggerMiddlewareMock = () => (req, res, next) => {
};
const MetaMaskController = proxyquire('./metamask-controller', {
'./controllers/threebox': { default: ThreeBoxControllerMock },
'./lib/createLoggerMiddleware': { default: createLoggerMiddlewareMock },
}).default;
@ -245,15 +214,10 @@ describe('MetaMaskController', function () {
});
describe('submitPassword', function () {
const password = 'password';
beforeEach(async function () {
await metamaskController.createNewVaultAndKeychain(password);
threeBoxSpies.init.reset();
threeBoxSpies.turnThreeBoxSyncingOn.reset();
});
it('removes any identities that do not correspond to known accounts.', async function () {
const password = 'password';
await metamaskController.createNewVaultAndKeychain(password);
const fakeAddress = '0xbad0';
metamaskController.preferencesController.addAddresses([fakeAddress]);
await metamaskController.submitPassword(password);
@ -278,23 +242,6 @@ describe('MetaMaskController', function () {
);
});
});
it('gets the address from threebox and creates a new 3box instance', async function () {
await metamaskController.submitPassword(password);
assert(threeBoxSpies.init.calledOnce);
assert(threeBoxSpies.turnThreeBoxSyncingOn.calledOnce);
});
it('succeeds even if blockTracker or threeBoxController throw', async function () {
const throwErr = sinon.fake.throws('foo');
metamaskController.blockTracker.checkForLatestBlock = throwErr;
metamaskController.threeBoxController.getThreeBoxSyncingState = throwErr;
await metamaskController.submitPassword(password);
assert.ok(
throwErr.calledTwice,
'should have called checkForLatestBlock and getThreeBoxSyncingState',
);
});
});
describe('#createNewVaultAndKeychain', function () {

View File

@ -0,0 +1,23 @@
import { cloneDeep } from 'lodash';
const version = 75;
/**
* Delete the ThreeBoxController.
*/
export default {
version,
async migrate(originalVersionedData) {
const versionedData = cloneDeep(originalVersionedData);
versionedData.meta.version = version;
const state = versionedData.data;
const newState = transformState(state);
versionedData.data = newState;
return versionedData;
},
};
function transformState(state) {
delete state.ThreeBoxController;
return state;
}

View File

@ -0,0 +1,63 @@
import migration75 from './075';
describe('migration #75', () => {
it('should update the version metadata', async () => {
const oldStorage = {
meta: {
version: 74,
},
data: {},
};
const newStorage = await migration75.migrate(oldStorage);
expect(newStorage.meta).toStrictEqual({
version: 75,
});
});
it('should delete the ThreeBoxController', async () => {
const oldStorage = {
meta: {
version: 74,
},
data: {
FooController: { a: 'b' },
ThreeBoxController: {
stuff: 'stuff!',
moreStuff: { moreStuff: ['stuff', 'stuff', 'stuff'] },
},
},
};
const newStorage = await migration75.migrate(oldStorage);
expect(newStorage).toStrictEqual({
meta: {
version: 75,
},
data: {
FooController: { a: 'b' },
},
});
});
it('should handle missing ThreeBoxController', async () => {
const oldStorage = {
meta: {
version: 74,
},
data: {
FooController: { a: 'b' },
},
};
const newStorage = await migration75.migrate(oldStorage);
expect(newStorage).toStrictEqual({
meta: {
version: 75,
},
data: {
FooController: { a: 'b' },
},
});
});
});

View File

@ -78,6 +78,7 @@ import m071 from './071';
import m072 from './072';
import m073 from './073';
import m074 from './074';
import m075 from './075';
const migrations = [
m002,
@ -153,6 +154,7 @@ const migrations = [
m072,
m073,
m074,
m075,
];
export default migrations;

View File

@ -1,68 +0,0 @@
function delay(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
async function loadFromMock3Box(key) {
const res = await window.fetch(`http://localhost:8889?key=${key}`);
const text = await res.text();
return text.length ? JSON.parse(text) : null;
}
async function saveToMock3Box(key, newDataAtKey) {
const res = await window.fetch('http://localhost:8889', {
method: 'POST',
body: JSON.stringify({
key,
data: newDataAtKey,
}),
});
return res.text();
}
class Mock3Box {
static openBox(address) {
this.address = address;
return Promise.resolve({
onSyncDone: (cb) => {
setTimeout(cb, 200);
},
openSpace: async (spaceName, config) => {
const { onSyncDone } = config;
this.spaceName = spaceName;
setTimeout(onSyncDone, 150);
await delay(50);
return {
private: {
get: async (key) => {
await delay(50);
const res = await loadFromMock3Box(
`${this.address}-${this.spaceName}-${key}`,
);
return res;
},
set: async (key, data) => {
await saveToMock3Box(
`${this.address}-${this.spaceName}-${key}`,
data,
);
await delay(50);
return null;
},
},
};
},
logout: () => undefined,
});
}
static async getConfig(address) {
const backup = await loadFromMock3Box(`${address}-metamask-metamaskBackup`);
return backup ? { spaces: { metamask: {} } } : {};
}
}
module.exports = Mock3Box;

View File

@ -48,7 +48,6 @@
"app/scripts/controllers/preferences.test.js",
"app/scripts/controllers/swaps.js",
"app/scripts/controllers/swaps.test.js",
"app/scripts/controllers/threebox.js",
"app/scripts/controllers/transactions/index.js",
"app/scripts/controllers/transactions/index.test.js",
"app/scripts/controllers/transactions/lib/tx-state-history-helpers.js",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -20,11 +20,6 @@
"fetch": true
}
},
"3box>graphql-request>cross-fetch>node-fetch": {
"globals": {
"fetch": true
}
},
"lodash": {
"globals": {
"setTimeout": true,

View File

@ -1,11 +1,5 @@
{
"resources": {
"3box>ipfs>superstruct>clone-deep>shallow-clone>mixin-object": {
"packages": {
"3box>ipfs>superstruct>clone-deep>shallow-clone>mixin-object>for-in": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"@babel/code-frame": {
"globals": {
"console.warn": true,
@ -1809,7 +1803,6 @@
},
"packages": {
"chokidar>braces": true,
"chokidar>fsevents": true,
"chokidar>glob-parent": true,
"chokidar>is-binary-path": true,
"chokidar>normalize-path": true,
@ -1836,12 +1829,6 @@
"chokidar>braces>fill-range>to-regex-range>is-number": true
}
},
"chokidar>fsevents": {
"globals": {
"process.platform": true
},
"native": true
},
"chokidar>glob-parent": {
"builtin": {
"os.platform": true,
@ -2880,21 +2867,7 @@
},
"packages": {
"eslint>file-entry-cache>flat-cache>flatted": true,
"eslint>file-entry-cache>flat-cache>rimraf": true
}
},
"eslint>file-entry-cache>flat-cache>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"nyc>glob": true
"nyc>rimraf": true
}
},
"eslint>glob-parent": {
@ -4131,9 +4104,9 @@
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic": {
"packages": {
"3box>ipfs>kind-of": true,
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic>math-random": true,
"gulp>undertaker>bach>array-last>is-number": true
"gulp>undertaker>bach>array-last>is-number": true,
"webpack>micromatch>kind-of": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic>math-random": {
@ -4249,7 +4222,6 @@
"gulp-watch>chokidar>anymatch": true,
"gulp-watch>chokidar>async-each": true,
"gulp-watch>chokidar>braces": true,
"gulp-watch>chokidar>fsevents": true,
"gulp-watch>chokidar>is-binary-path": true,
"gulp-watch>chokidar>normalize-path": true,
"gulp-watch>chokidar>readdirp": true,
@ -4398,389 +4370,6 @@
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"gulp-watch>chokidar>fsevents": {
"builtin": {
"events.EventEmitter": true,
"fs.stat": true,
"path.join": true,
"util.inherits": true
},
"globals": {
"__dirname": true,
"process.nextTick": true,
"process.platform": true,
"setImmediate": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp": {
"builtin": {
"events.EventEmitter": true,
"fs.existsSync": true,
"fs.readFileSync": true,
"fs.renameSync": true,
"path.dirname": true,
"path.existsSync": true,
"path.join": true,
"path.resolve": true,
"url.parse": true,
"url.resolve": true,
"util.inherits": true
},
"globals": {
"__dirname": true,
"console.log": true,
"process.arch": true,
"process.cwd": true,
"process.env": true,
"process.platform": true,
"process.version.substr": true,
"process.versions": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>semver": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": {
"builtin": {
"child_process.spawnSync": true,
"fs.readdirSync": true,
"os.platform": true
},
"globals": {
"process.env": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": {
"builtin": {
"path": true,
"stream.Stream": true,
"url": true
},
"globals": {
"console": true,
"process.argv": true,
"process.env.DEBUG_NOPT": true,
"process.env.NOPT_DEBUG": true,
"process.platform": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": {
"builtin": {
"child_process.exec": true,
"path": true
},
"globals": {
"process.env.COMPUTERNAME": true,
"process.env.ComSpec": true,
"process.env.EDITOR": true,
"process.env.HOSTNAME": true,
"process.env.PATH": true,
"process.env.PROMPT": true,
"process.env.PS1": true,
"process.env.Path": true,
"process.env.SHELL": true,
"process.env.USER": true,
"process.env.USERDOMAIN": true,
"process.env.USERNAME": true,
"process.env.VISUAL": true,
"process.env.path": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": {
"builtin": {
"os.homedir": true
},
"globals": {
"process.env": true,
"process.getuid": true,
"process.platform": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": {
"globals": {
"process.env.SystemRoot": true,
"process.env.TEMP": true,
"process.env.TMP": true,
"process.env.TMPDIR": true,
"process.env.windir": true,
"process.platform": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": {
"builtin": {
"events.EventEmitter": true,
"util": true
},
"globals": {
"process.nextTick": true,
"process.stderr": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": {
"builtin": {
"events.EventEmitter": true,
"util.inherits": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>delegates": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": {
"builtin": {
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.browser": true,
"process.env.READABLE_STREAM": true,
"process.stderr": true,
"process.stdout": true,
"process.version.slice": true,
"setImmediate": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": {
"globals": {
"Buffer.isBuffer": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": {
"globals": {
"process": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": {
"builtin": {
"util.deprecate": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": {
"builtin": {
"util.format": true
},
"globals": {
"clearInterval": true,
"process": true,
"setImmediate": true,
"setInterval": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>object-assign": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": {
"builtin": {
"os.type": true
},
"globals": {
"process.env.LANG": true,
"process.env.LC_ALL": true,
"process.env.LC_CTYPE": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": {
"builtin": {
"assert.equal": true,
"events": true
},
"globals": {
"process": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>code-point-at": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point>number-is-nan": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": {
"globals": {
"process.stderr": true,
"process.stdout": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": {
"builtin": {
"assert": true,
"events.EventEmitter": true,
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readdir": true,
"fs.readdirSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.join": true,
"path.resolve": true,
"util": true
},
"globals": {
"console.error": true,
"process.cwd": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readlink": true,
"fs.readlinkSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.normalize": true,
"path.resolve": true
},
"globals": {
"console.error": true,
"console.trace": true,
"process.env.NODE_DEBUG": true,
"process.nextTick": true,
"process.noDeprecation": true,
"process.platform": true,
"process.throwDeprecation": true,
"process.traceDeprecation": true,
"process.version": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": {
"globals": {
"process.nextTick": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": {
"builtin": {
"util.inherits": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": {
"builtin": {
"path": true
},
"globals": {
"console.error": true
},
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>balanced-match": true,
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>concat-map": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": {
"packages": {
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": {
"globals": {
"process.platform": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>semver": {
"globals": {
"console": true,
"process": true
}
},
"gulp-watch>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": {
"builtin": {
"buffer": true
}
},
"gulp-watch>chokidar>is-binary-path": {
"builtin": {
"path.extname": true
@ -5187,7 +4776,6 @@
"process.platform": true
},
"packages": {
"3box>ipfs>kind-of": true,
"gulp>glob-watcher>anymatch>micromatch>define-property": true,
"gulp>glob-watcher>anymatch>micromatch>extend-shallow": true,
"gulp>glob-watcher>chokidar>braces": true,
@ -5195,6 +4783,7 @@
"webpack>micromatch>array-unique": true,
"webpack>micromatch>extglob": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>kind-of": true,
"webpack>micromatch>nanomatch": true,
"webpack>micromatch>object.pick": true,
"webpack>micromatch>regex-not": true,
@ -5281,7 +4870,6 @@
"gulp-watch>path-is-absolute": true,
"gulp>glob-watcher>anymatch": true,
"gulp>glob-watcher>chokidar>braces": true,
"gulp>glob-watcher>chokidar>fsevents": true,
"gulp>glob-watcher>chokidar>is-binary-path": true,
"gulp>glob-watcher>chokidar>normalize-path": true,
"gulp>glob-watcher>chokidar>readdirp": true,
@ -5330,389 +4918,6 @@
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"gulp>glob-watcher>chokidar>fsevents": {
"builtin": {
"events.EventEmitter": true,
"fs.stat": true,
"path.join": true,
"util.inherits": true
},
"globals": {
"__dirname": true,
"process.nextTick": true,
"process.platform": true,
"setImmediate": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp": {
"builtin": {
"events.EventEmitter": true,
"fs.existsSync": true,
"fs.readFileSync": true,
"fs.renameSync": true,
"path.dirname": true,
"path.existsSync": true,
"path.join": true,
"path.resolve": true,
"url.parse": true,
"url.resolve": true,
"util.inherits": true
},
"globals": {
"__dirname": true,
"console.log": true,
"process.arch": true,
"process.cwd": true,
"process.env": true,
"process.platform": true,
"process.version.substr": true,
"process.versions": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>detect-libc": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>semver": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>detect-libc": {
"builtin": {
"child_process.spawnSync": true,
"fs.readdirSync": true,
"os.platform": true
},
"globals": {
"process.env": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt": {
"builtin": {
"path": true,
"stream.Stream": true,
"url": true
},
"globals": {
"console": true,
"process.argv": true,
"process.env.DEBUG_NOPT": true,
"process.env.NOPT_DEBUG": true,
"process.platform": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv": {
"builtin": {
"child_process.exec": true,
"path": true
},
"globals": {
"process.env.COMPUTERNAME": true,
"process.env.ComSpec": true,
"process.env.EDITOR": true,
"process.env.HOSTNAME": true,
"process.env.PATH": true,
"process.env.PROMPT": true,
"process.env.PS1": true,
"process.env.Path": true,
"process.env.SHELL": true,
"process.env.USER": true,
"process.env.USERDOMAIN": true,
"process.env.USERNAME": true,
"process.env.VISUAL": true,
"process.env.path": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": {
"builtin": {
"os.homedir": true
},
"globals": {
"process.env": true,
"process.getuid": true,
"process.platform": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": {
"globals": {
"process.env.SystemRoot": true,
"process.env.TEMP": true,
"process.env.TMP": true,
"process.env.TMPDIR": true,
"process.env.windir": true,
"process.platform": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog": {
"builtin": {
"events.EventEmitter": true,
"util": true
},
"globals": {
"process.nextTick": true,
"process.stderr": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": {
"builtin": {
"events.EventEmitter": true,
"util.inherits": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>delegates": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": {
"builtin": {
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.browser": true,
"process.env.READABLE_STREAM": true,
"process.stderr": true,
"process.stdout": true,
"process.version.slice": true,
"setImmediate": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>core-util-is": {
"globals": {
"Buffer.isBuffer": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>process-nextick-args": {
"globals": {
"process": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>util-deprecate": {
"builtin": {
"util.deprecate": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge": {
"builtin": {
"util.format": true
},
"globals": {
"clearInterval": true,
"process": true,
"setImmediate": true,
"setInterval": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>object-assign": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": {
"builtin": {
"os.type": true
},
"globals": {
"process.env.LANG": true,
"process.env.LC_ALL": true,
"process.env.LC_CTYPE": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>signal-exit": {
"builtin": {
"assert.equal": true,
"events": true
},
"globals": {
"process": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>code-point-at": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point>number-is-nan": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>npmlog>set-blocking": {
"globals": {
"process.stderr": true,
"process.stdout": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob": {
"builtin": {
"assert": true,
"events.EventEmitter": true,
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readdir": true,
"fs.readdirSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.join": true,
"path.resolve": true,
"util": true
},
"globals": {
"console.error": true,
"process.cwd": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>fs.realpath": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readlink": true,
"fs.readlinkSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.normalize": true,
"path.resolve": true
},
"globals": {
"console.error": true,
"console.trace": true,
"process.env.NODE_DEBUG": true,
"process.nextTick": true,
"process.noDeprecation": true,
"process.platform": true,
"process.throwDeprecation": true,
"process.traceDeprecation": true,
"process.version": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inflight": {
"globals": {
"process.nextTick": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>inherits": {
"builtin": {
"util.inherits": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch": {
"builtin": {
"path": true
},
"globals": {
"console.error": true
},
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>balanced-match": true,
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>minimatch>brace-expansion>concat-map": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once": {
"packages": {
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>once>wrappy": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>rimraf>glob>path-is-absolute": {
"globals": {
"process.platform": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>semver": {
"globals": {
"console": true,
"process": true
}
},
"gulp>glob-watcher>chokidar>fsevents>node-pre-gyp>tar>safe-buffer": {
"builtin": {
"buffer": true
}
},
"gulp>glob-watcher>chokidar>is-binary-path": {
"builtin": {
"path.extname": true
@ -5793,7 +4998,7 @@
},
"gulp>undertaker>arr-map>make-iterator": {
"packages": {
"3box>ipfs>kind-of": true
"webpack>micromatch>kind-of": true
}
},
"gulp>undertaker>bach": {
@ -6419,9 +5624,9 @@
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone": {
"packages": {
"3box>ipfs>superstruct>clone-deep>shallow-clone>mixin-object": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>kind-of": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>lazy-cache": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
@ -6438,6 +5643,12 @@
"process.env.UNLAZY": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object": {
"packages": {
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object>for-in": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"lavamoat>lavamoat-core>merge-deep>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
@ -6646,6 +5857,20 @@
"path.resolve": true
}
},
"nyc>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"nyc>glob": true
}
},
"nyc>signal-exit": {
"builtin": {
"assert.equal": true,
@ -7991,19 +7216,19 @@
},
"webpack>micromatch>define-property>is-descriptor": {
"packages": {
"3box>ipfs>kind-of": true,
"webpack>micromatch>define-property>is-descriptor>is-accessor-descriptor": true,
"webpack>micromatch>define-property>is-descriptor>is-data-descriptor": true
"webpack>micromatch>define-property>is-descriptor>is-data-descriptor": true,
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"3box>ipfs>kind-of": true
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"3box>ipfs>kind-of": true
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>extglob": {
@ -8106,11 +7331,11 @@
"util.inspect": true
},
"packages": {
"3box>ipfs>kind-of": true,
"nyc>spawn-wrap>is-windows": true,
"webpack>micromatch>arr-diff": true,
"webpack>micromatch>array-unique": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>kind-of": true,
"webpack>micromatch>nanomatch>define-property": true,
"webpack>micromatch>nanomatch>extend-shallow": true,
"webpack>micromatch>nanomatch>is-odd": true,
@ -8423,7 +7648,7 @@
},
"webpack>micromatch>snapdragon>use": {
"packages": {
"3box>ipfs>kind-of": true
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>to-regex": {

View File

@ -91,26 +91,15 @@
"**/redux/symbol-observable": "^2.0.3",
"**/redux-devtools-instrument/symbol-observable": "^2.0.3",
"**/rxjs/symbol-observable": "^2.0.3",
"**/xmlhttprequest-ssl": "^1.6.2",
"3box/ipfs/ipld-zcash/zcash-bitcore-lib/lodash": "^4.17.21",
"3box/ipfs/ipld-zcash/zcash-bitcore-lib/elliptic": "^6.5.4",
"3box/ipfs/libp2p-mdns/multicast-dns/dns-packet": "^5.2.2",
"3box/ipfs/prometheus-gc-stats/gc-stats/node-pre-gyp/tar": "^6.1.2",
"3box/**/libp2p-crypto/node-forge": "^1.3.0",
"3box/**/libp2p-keychain/node-forge": "^1.3.0",
"3box/ipfs/libp2p-webrtc-star/socket.io/engine.io": "^4.0.0",
"3box/**/@hapi/hoek": "^8.5.1",
"analytics-node/axios": "^0.21.2",
"ganache-core/lodash": "^4.17.21",
"netmask": "^2.0.1",
"pubnub/superagent-proxy": "^3.0.0",
"pull-ws": "^3.3.2",
"json-schema": "^0.4.0",
"simple-get": "^4.0.1",
"@storybook/**/ast-types": "^0.14.2"
},
"dependencies": {
"3box": "^1.10.2",
"@babel/runtime": "^7.5.5",
"@download/blockies": "^1.0.3",
"@ensdomains/content-hash": "^2.5.6",
@ -420,23 +409,6 @@
"chromedriver": true,
"geckodriver": true,
"react-devtools>electron": true,
"3box>ipfs-postmsg-proxy>peer-id>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": false,
"3box>ipfs>ipfs-repo>datastore-level>leveldown": false,
"3box>ipfs>ipfs-unixfs-importer>rabin-wasm>assemblyscript": false,
"3box>ipfs>ipld-ethereum>ethereumjs-account>ethereumjs-util>keccak": false,
"3box>ipfs>ipld-ethereum>ethereumjs-account>ethereumjs-util>secp256k1": false,
"3box>ipfs>ipld-ethereum>ethereumjs-block>ethereumjs-util>keccak": false,
"3box>ipfs>ipld-ethereum>ethereumjs-block>ethereumjs-util>secp256k1": false,
"3box>ipfs>ipld-ethereum>ethereumjs-tx>ethereumjs-util>keccak": false,
"3box>ipfs>ipld-ethereum>ethereumjs-tx>ethereumjs-util>secp256k1": false,
"3box>ipfs>ipld-ethereum>merkle-patricia-tree>ethereumjs-util>keccak": false,
"3box>ipfs>ipld-ethereum>merkle-patricia-tree>ethereumjs-util>secp256k1": false,
"3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": false,
"3box>ipfs>libp2p-crypto>ursa-optional": false,
"3box>ipfs>prometheus-gc-stats>gc-stats": false,
"3box>orbit-db>orbit-db-cache>leveldown": false,
"3box>orbit-db>orbit-db-keystore>leveldown": false,
"3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>@ledgerhq/hw-transport-node-hid-noevents>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>usb": false,

View File

@ -1,37 +0,0 @@
lazy precompute for faster module initialization
diff --git a/node_modules/secp256k1/lib/js/ecpointg.js b/node_modules/secp256k1/lib/js/ecpointg.js
index 0144364..09a87c5 100644
--- a/node_modules/secp256k1/lib/js/ecpointg.js
+++ b/node_modules/secp256k1/lib/js/ecpointg.js
@@ -8,11 +8,12 @@ function ECPointG () {
this.x = BN.fromBuffer(Buffer.from('79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798', 'hex'))
this.y = BN.fromBuffer(Buffer.from('483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8', 'hex'))
this.inf = false
-
- this._precompute()
+ this.precomputed = undefined
}
ECPointG.prototype._precompute = function () {
+ if (this.precomputed !== undefined) return
+
var ecpoint = new ECPoint(this.x, this.y)
var dstep = 4
@@ -34,6 +35,7 @@ ECPointG.prototype._precompute = function () {
}
ECPointG.prototype.mul = function (num) {
+ this._precompute()
// Algorithm 3.42 Fixed-base NAF windowing method for point multiplication
var step = this.precomputed.doubles.step
var points = this.precomputed.doubles.points
@@ -68,6 +70,7 @@ ECPointG.prototype.mul = function (num) {
}
ECPointG.prototype.mulAdd = function (k1, p2, k2) {
+ this._precompute()
var nafPointsP1 = this.precomputed.naf
var nafPointsP2 = p2._getNAFPoints1()
var wnd = [nafPointsP1.points, nafPointsP2.points]

View File

@ -178,8 +178,8 @@
* identify the new number_of_tokens trait
* @property {'opensea_api_enabled'} OPENSEA_API_ENABLED - when the OpenSea API is enabled
* we identify the opensea_api_enabled trait
* @property {'three_box_enabled'} THREE_BOX_ENABLED - when 3box feature is
* toggled we identify the 3box_enabled trait
* @property {'three_box_enabled'} THREE_BOX_ENABLED - When 3Box feature is
* toggled we identify the 3box_enabled trait. This trait has been deprecated.
* @property {'theme'} THEME - when the user's theme changes we identify the theme trait
* @property {'token_detection_enabled'} TOKEN_DETECTION_ENABLED - when token detection feature is toggled we
* identify the token_detection_enabled trait
@ -231,8 +231,8 @@ export const TRAITS = {
* the user has across all networks and accounts.
* @property {boolean} [opensea_api_enabled] - does the user have the OpenSea
* API enabled?
* @property {boolean} [three_box_enabled] - does the user have 3box sync
* enabled?
* @property {boolean} [three_box_enabled] - Does the user have 3box sync
* enabled? (deprecated)
* @property {string} [theme] - which theme the user has selected
* @property {boolean} [token_detection_enabled] - does the user have token detection is enabled?
*/

View File

@ -593,16 +593,6 @@ class FixtureBuilder {
return this;
}
withThreeBoxController(data) {
merge(
this.fixture.data.ThreeBoxController
? this.fixture.data.ThreeBoxController
: (this.fixture.data.ThreeBoxController = {}),
data,
);
return this;
}
withTokenListController(data) {
merge(
this.fixture.data.TokenListController

View File

@ -1,57 +0,0 @@
const http = require('http');
const PORT = 8889;
class ThreeboxMockServer {
constructor() {
this.server = http.createServer(this.requestHandler);
this.database = {};
}
async start() {
return new Promise((resolve, reject) => {
this.server = this.server.listen(PORT);
this.server.once('error', reject);
this.server.once('listening', resolve);
});
}
async stop() {
if (!this.server) {
return;
}
await new Promise((resolve, reject) => {
this.server.close();
this.server.once('error', reject);
this.server.once('close', resolve);
});
}
requestHandler = (request, response) => {
response.setHeader('Content-Type', 'application/json');
if (request.method === 'POST') {
let body = '';
request.on('data', (chunk) => {
body += chunk.toString(); // convert Buffer to string
});
request.on('end', () => {
const { key, data } = JSON.parse(body);
this.database[key] = data;
response.setHeader('Access-Control-Allow-Headers', '*');
response.end('ok');
});
} else if (request.method === 'GET') {
const key = new URL(request.url, 'https://example.org/').searchParams.get(
'key',
);
response.setHeader('Access-Control-Allow-Headers', '*');
response.end(JSON.stringify(this.database[key] || ''));
} else {
response.end('unknown request');
}
};
}
module.exports = ThreeboxMockServer;

View File

@ -0,0 +1,50 @@
{
"addressBook": {
"addressBook": {
"0x539": {
"0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb": {
"address": "0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb",
"chainId": "0x539",
"isEns": false,
"memo": "",
"name": "Test Account"
}
}
}
},
"preferences": {
"advancedGasFee": null,
"currentLocale": "en",
"dismissSeedBackUpReminder": true,
"featureFlags": {
"showIncomingTransactions": true
},
"forgottenPassword": false,
"frequentRpcListDetail": [
{
"chainId": "0x539",
"nickname": "Localhost 8545",
"rpcPrefs": {},
"rpcUrl": "http://localhost:8545",
"ticker": "ETH"
}
],
"infuraBlocked": false,
"ipfsGateway": "dweb.link",
"knownMethodData": {},
"ledgerTransportType": "webhid",
"openSeaEnabled": false,
"preferences": {
"hideZeroBalanceTokens": false,
"showFiatInTestnets": false,
"showTestNetworks": false,
"useNativeCurrencyAsPrimaryCurrency": true
},
"theme": "light",
"useBlockie": false,
"useCollectibleDetection": false,
"useNonceField": false,
"usePhishDetect": true,
"useTokenDetection": false
}
}

View File

@ -1,5 +1,6 @@
const { strict: assert } = require('assert');
const { promises: fs } = require('fs');
const path = require('path');
const {
convertToHexValue,
withFixtures,
@ -36,7 +37,14 @@ const backupExists = async () => {
}
};
describe('Backup', function () {
const restoreFile = path.join(
__dirname,
'..',
'restore',
'MetaMaskUserData.json',
);
describe('Backup and Restore', function () {
const ganacheOptions = {
accounts: [
{
@ -46,7 +54,7 @@ describe('Backup', function () {
},
],
};
it('should create backup for the account', async function () {
it('should backup the account settings', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
@ -79,4 +87,40 @@ describe('Backup', function () {
},
);
});
it('should restore the account settings', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// Restore
await driver.clickElement('.account-menu__icon');
await driver.clickElement({ text: 'Settings', tag: 'div' });
await driver.clickElement({ text: 'Advanced', tag: 'div' });
const restore = await driver.findElement('#restore-file');
await restore.sendKeys(restoreFile);
// Dismiss success message
await driver.waitForSelector({
css: '.actionable-message__message',
text: 'Your data has been restored successfully',
});
await driver.clickElement({ text: 'Dismiss', tag: 'button' });
// Verify restore
await driver.clickElement({ text: 'Contacts', tag: 'div' });
const recipient = await driver.findElement('[data-testid="recipient"]');
assert.ok(
/Test\sAccount\s*0x0c54...AaFb/u.test(await recipient.getText()),
);
},
);
});
});

View File

@ -1,102 +0,0 @@
const { convertToHexValue, withFixtures, largeDelayMs } = require('../helpers');
const ThreeboxMockServer = require('../mock-3box/threebox-mock-server');
const FixtureBuilder = require('../fixture-builder');
describe('Threebox', function () {
const ganacheOptions = {
accounts: [
{
secretKey:
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
balance: convertToHexValue(25000000000000000000),
},
],
};
let threeboxServer;
before(async function () {
threeboxServer = new ThreeboxMockServer();
await threeboxServer.start();
});
after(async function () {
await threeboxServer.stop();
});
it('Set up data to be restored by 3box', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// turns on threebox syncing
await driver.clickElement('.account-menu__icon');
await driver.clickElement({ text: 'Settings', tag: 'div' });
// turns on threebox syncing
await driver.clickElement({ text: 'Advanced', tag: 'div' });
await driver.clickElement(
'[data-testid="advanced-setting-3box"] .toggle-button div',
);
// updates settings and address book
// navigates to General settings
await driver.clickElement({ text: 'General', tag: 'div' });
// turns on use of blockies
await driver.clickElement('.toggle-button > div');
// adds an address to the contact list
await driver.clickElement({ text: 'Contacts', tag: 'div' });
await driver.clickElement('.address-book__link');
await driver.fill('#nickname', 'Test User Name 11');
await driver.fill(
'input[placeholder="Search, public address (0x), or ENS"]',
'0x2f318C334780961FB129D2a6c30D0763d9a5C970',
);
await driver.delay(largeDelayMs * 2);
await driver.clickElement({ text: 'Save', tag: 'button' });
await driver.findElement({ text: 'Test User Name 11', tag: 'div' });
},
);
});
it('Restore from 3box', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder()
.withThreeBoxController({
threeBoxSyncingAllowed: true,
showRestorePrompt: true,
threeBoxLastUpdated: 0,
threeBoxAddress: '0x64480aa2768ef12f3f19c5a01206ceb0f82d06b9',
threeBoxSynced: true,
threeBoxDisabled: false,
})
.build(),
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// confirms the 3box restore notification
await driver.clickElement('.home-notification__accept-button');
// goes to the settings screen
await driver.clickElement('.account-menu__icon');
await driver.clickElement({ text: 'Settings', tag: 'div' });
// finds the restored address in the contact list
await driver.clickElement({ text: 'Contacts', tag: 'div' });
await driver.findElement({ text: 'Test User Name 11', tag: 'div' });
},
);
});
});

View File

@ -4,9 +4,6 @@ import {
} from '../../../shared/constants/hardware-wallets';
import * as actionConstants from '../../store/actionConstants';
// actionConstants
const SET_THREEBOX_LAST_UPDATED = 'metamask/app/SET_THREEBOX_LAST_UPDATED';
export default function reduceApp(state = {}, action) {
// default state
const appState = {
@ -42,8 +39,6 @@ export default function reduceApp(state = {}, action) {
},
networksTabSelectedRpcUrl: '',
loadingMethodData: false,
show3BoxModalAfterImport: false,
threeBoxLastUpdated: null,
requestAccountTabs: {},
openMetaMaskTabs: {},
currentWindowTab: {},
@ -341,12 +336,6 @@ export default function reduceApp(state = {}, action) {
loadingMethodData: false,
};
case SET_THREEBOX_LAST_UPDATED:
return {
...appState,
threeBoxLastUpdated: action.value,
};
case actionConstants.SET_REQUEST_ACCOUNT_TABS:
return {
...appState,
@ -418,13 +407,6 @@ export default function reduceApp(state = {}, action) {
}
// Action Creators
export function setThreeBoxLastUpdated(lastUpdated) {
return {
type: SET_THREEBOX_LAST_UPDATED,
value: lastUpdated,
};
}
export function hideWhatsNewPopup() {
return {
type: actionConstants.HIDE_WHATS_NEW_POPUP,

View File

@ -118,13 +118,6 @@ export const SETTINGS_CONSTANTS = [
route: `${ADVANCED_ROUTE}#autolock-timer`,
icon: 'fas fa-sliders-h',
},
{
tabMessage: (t) => t('advanced'),
sectionMessage: (t) => t('syncWithThreeBox'),
descriptionMessage: (t) => t('syncWithThreeBoxDescription'),
route: `${ADVANCED_ROUTE}#sync-with3box`,
icon: 'fas fa-sliders-h',
},
{
tabMessage: (t) => t('advanced'),
sectionMessage: (t) => t('ipfsGateway'),

View File

@ -57,10 +57,6 @@ const t = (key) => {
return 'Auto-lock timer (minutes)';
case 'autoLockTimeLimitDescription':
return 'Set the idle time in minutes before MetaMask will become locked.';
case 'syncWithThreeBox':
return 'Sync data with 3Box (experimental)';
case 'syncWithThreeBoxDescription':
return 'Turn on to have your settings backed up with 3Box. This feature is currently experimental; use at your own risk.';
case 'ipfsGateway':
return 'IPFS Gateway';
case 'ipfsGatewayDescription':
@ -163,7 +159,7 @@ describe('Settings Search Utils', () => {
});
it('should get good advanced section number', () => {
expect(getNumberOfSettingsInSection(t, t('advanced'))).toStrictEqual(16);
expect(getNumberOfSettingsInSection(t, t('advanced'))).toStrictEqual(15);
});
it('should get good contact section number', () => {

View File

@ -20,7 +20,6 @@ export default class ImportWithSeedPhrase extends PureComponent {
history: PropTypes.object,
onSubmit: PropTypes.func.isRequired,
setSeedPhraseBackedUp: PropTypes.func,
initializeThreeBox: PropTypes.func,
};
UNSAFE_componentWillMount() {
@ -43,8 +42,7 @@ export default class ImportWithSeedPhrase extends PureComponent {
}
handleImport = async (password, seedPhrase) => {
const { history, onSubmit, setSeedPhraseBackedUp, initializeThreeBox } =
this.props;
const { history, onSubmit, setSeedPhraseBackedUp } = this.props;
await onSubmit(password, seedPhrase);
this.context.trackEvent({
@ -57,7 +55,6 @@ export default class ImportWithSeedPhrase extends PureComponent {
});
await setSeedPhraseBackedUp(true);
initializeThreeBox();
history.replace(INITIALIZE_END_OF_FLOW_ROUTE);
};

View File

@ -1,15 +1,11 @@
import { connect } from 'react-redux';
import {
setSeedPhraseBackedUp,
initializeThreeBox,
} from '../../../../store/actions';
import { setSeedPhraseBackedUp } from '../../../../store/actions';
import ImportWithSeedPhrase from './import-with-seed-phrase.component';
const mapDispatchToProps = (dispatch) => {
return {
setSeedPhraseBackedUp: (seedPhraseBackupState) =>
dispatch(setSeedPhraseBackedUp(seedPhraseBackupState)),
initializeThreeBox: () => dispatch(initializeThreeBox()),
};
};

View File

@ -139,13 +139,11 @@ describe('ConfirmSeedPhrase Component', () => {
];
const trackEventSpy = sinon.spy();
const replaceSpy = sinon.spy();
const initialize3BoxSpy = sinon.spy();
const component = shallowRender(
{
seedPhrase: '鼠 牛 虎 兔 龍 蛇 馬 羊 猴 雞 狗 豬',
history: { replace: replaceSpy },
setSeedPhraseBackedUp: () => Promise.resolve(),
initializeThreeBox: initialize3BoxSpy,
},
{
trackEvent: trackEventSpy,
@ -174,7 +172,6 @@ describe('ConfirmSeedPhrase Component', () => {
is_backup_skipped: false,
},
});
expect(initialize3BoxSpy.calledOnce).toStrictEqual(true);
expect(replaceSpy.args[0][0]).toStrictEqual('/initialize/end-of-flow');
});
});

View File

@ -28,7 +28,6 @@ export default class ConfirmSeedPhrase extends PureComponent {
static propTypes = {
history: PropTypes.object,
seedPhrase: PropTypes.string,
initializeThreeBox: PropTypes.func,
setSeedPhraseBackedUp: PropTypes.func,
};
@ -74,7 +73,7 @@ export default class ConfirmSeedPhrase extends PureComponent {
};
handleSubmit = async () => {
const { history, setSeedPhraseBackedUp, initializeThreeBox } = this.props;
const { history, setSeedPhraseBackedUp } = this.props;
if (!this.isValid()) {
return;
@ -91,7 +90,6 @@ export default class ConfirmSeedPhrase extends PureComponent {
},
});
initializeThreeBox();
history.replace(INITIALIZE_END_OF_FLOW_ROUTE);
});
} catch (error) {

View File

@ -1,15 +1,11 @@
import { connect } from 'react-redux';
import {
setSeedPhraseBackedUp,
initializeThreeBox,
} from '../../../../store/actions';
import { setSeedPhraseBackedUp } from '../../../../store/actions';
import ConfirmSeedPhrase from './confirm-seed-phrase.component';
const mapDispatchToProps = (dispatch) => {
return {
setSeedPhraseBackedUp: (seedPhraseBackupState) =>
dispatch(setSeedPhraseBackedUp(seedPhraseBackupState)),
initializeThreeBox: () => dispatch(initializeThreeBox()),
};
};

View File

@ -6,7 +6,6 @@ import {
EVENT_NAMES,
CONTEXT_PROPS,
} from '../../../shared/constants/metametrics';
import { formatDate } from '../../helpers/utils/util';
import AssetList from '../../components/app/asset-list';
import CollectiblesTab from '../../components/app/collectibles-tab';
import HomeNotification from '../../components/app/home-notification';
@ -88,14 +87,6 @@ export default class Home extends PureComponent {
shouldShowSeedPhraseReminder: PropTypes.bool.isRequired,
isPopup: PropTypes.bool,
isNotification: PropTypes.bool.isRequired,
threeBoxSynced: PropTypes.bool,
setupThreeBox: PropTypes.func,
turnThreeBoxSyncingOn: PropTypes.func,
showRestorePrompt: PropTypes.bool,
selectedAddress: PropTypes.string,
restoreFromThreeBox: PropTypes.func,
setShowRestorePromptToFalse: PropTypes.func,
threeBoxLastUpdated: PropTypes.number,
firstPermissionsRequestId: PropTypes.string,
// This prop is used in the `shouldCloseNotificationPopup` function
// eslint-disable-next-line react/no-unused-prop-types
@ -236,26 +227,13 @@ export default class Home extends PureComponent {
}
componentDidUpdate(_prevProps, prevState) {
const {
closeNotificationPopup,
setupThreeBox,
showRestorePrompt,
threeBoxLastUpdated,
threeBoxSynced,
isNotification,
} = this.props;
const { closeNotificationPopup, isNotification } = this.props;
const { notificationClosing } = this.state;
if (notificationClosing && !prevState.notificationClosing) {
closeNotificationPopup();
} else if (isNotification) {
this.checkStatusAndNavigate();
} else if (
threeBoxSynced &&
showRestorePrompt &&
threeBoxLastUpdated === null
) {
setupThreeBox();
}
}
@ -274,12 +252,6 @@ export default class Home extends PureComponent {
history,
shouldShowSeedPhraseReminder,
isPopup,
selectedAddress,
restoreFromThreeBox,
turnThreeBoxSyncingOn,
setShowRestorePromptToFalse,
showRestorePrompt,
threeBoxLastUpdated,
shouldShowWeb3ShimUsageNotification,
setWeb3ShimUsageAlertDismissed,
originOfCurrentTab,
@ -457,25 +429,6 @@ export default class Home extends PureComponent {
key="home-backupApprovalNotice"
/>
) : null}
{threeBoxLastUpdated && showRestorePrompt ? (
<HomeNotification
descriptionText={t('restoreWalletPreferences', [
formatDate(threeBoxLastUpdated, 'M/d/y'),
])}
acceptText={t('restore')}
ignoreText={t('noThanks')}
infoText={t('dataBackupFoundInfo')}
onAccept={() => {
restoreFromThreeBox(selectedAddress).then(() => {
turnThreeBoxSyncingOn();
});
}}
onIgnore={() => {
setShowRestorePromptToFalse();
}}
key="home-privacyModeDefault"
/>
) : null}
{infuraBlocked && this.state.canShowBlockageNotification ? (
<HomeNotification
descriptionText={t('infuraBlockedNotification', [

View File

@ -28,11 +28,7 @@ import {
import {
closeNotificationPopup,
restoreFromThreeBox,
turnThreeBoxSyncingOn,
getThreeBoxLastUpdated,
hidePortfolioTooltip,
setShowRestorePromptToFalse,
setConnectedStatusPopoverHasBeenShown,
setDefaultHomeActiveTabName,
setWeb3ShimUsageAlertDismissed,
@ -48,7 +44,6 @@ import {
///: END:ONLY_INCLUDE_IN
} from '../../store/actions';
import {
setThreeBoxLastUpdated,
hideWhatsNewPopup,
setNewCustomNetworkAdded,
getPortfolioTooltipWasShownInThisSession,
@ -72,8 +67,6 @@ const mapStateToProps = (state) => {
const {
suggestedAssets,
seedPhraseBackedUp,
threeBoxSynced,
showRestorePrompt,
selectedAddress,
connectedStatusPopoverHasBeenShown,
defaultHomeActiveTabName,
@ -81,7 +74,7 @@ const mapStateToProps = (state) => {
firstTimeFlowType,
completedOnboarding,
} = metamask;
const { forgottenPassword, threeBoxLastUpdated } = appState;
const { forgottenPassword } = appState;
const totalUnapprovedCount = getTotalUnapprovedCount(state);
const swapsEnabled = getSwapsFeatureIsLive(state);
const pendingConfirmations = getUnapprovedTemplatedConfirmations(state);
@ -123,10 +116,7 @@ const mapStateToProps = (state) => {
shouldShowSeedPhraseReminder: getShouldShowSeedPhraseReminder(state),
isPopup,
isNotification,
threeBoxSynced,
showRestorePrompt,
selectedAddress,
threeBoxLastUpdated,
firstPermissionsRequestId,
totalUnapprovedCount,
connectedStatusPopoverHasBeenShown,
@ -163,22 +153,9 @@ const mapStateToProps = (state) => {
const mapDispatchToProps = (dispatch) => ({
closeNotificationPopup: () => closeNotificationPopup(),
turnThreeBoxSyncingOn: () => dispatch(turnThreeBoxSyncingOn()),
setupThreeBox: () => {
dispatch(getThreeBoxLastUpdated()).then((lastUpdated) => {
if (lastUpdated) {
dispatch(setThreeBoxLastUpdated(lastUpdated));
} else {
dispatch(setShowRestorePromptToFalse());
dispatch(turnThreeBoxSyncingOn());
}
});
},
///: BEGIN:ONLY_INCLUDE_IN(flask)
removeSnapError: async (id) => await removeSnapError(id),
///: END:ONLY_INCLUDE_IN
restoreFromThreeBox: (address) => dispatch(restoreFromThreeBox(address)),
setShowRestorePromptToFalse: () => dispatch(setShowRestorePromptToFalse()),
setConnectedStatusPopoverHasBeenShown: () =>
dispatch(setConnectedStatusPopoverHasBeenShown()),
onTabClick: (name) => dispatch(setDefaultHomeActiveTabName(name)),

View File

@ -4,7 +4,6 @@ import { connect } from 'react-redux';
import {
createNewVaultAndRestore,
unMarkPasswordForgotten,
initializeThreeBox,
} from '../../store/actions';
import { DEFAULT_ROUTE } from '../../helpers/constants/routes';
import CreateNewVault from '../../components/app/create-new-vault';
@ -26,7 +25,6 @@ class RestoreVaultPage extends Component {
leaveImportSeedScreenState: PropTypes.func,
history: PropTypes.object,
isLoading: PropTypes.bool,
initializeThreeBox: PropTypes.func,
};
handleImport = async (password, seedPhrase) => {
@ -35,8 +33,6 @@ class RestoreVaultPage extends Component {
createNewVaultAndRestore,
leaveImportSeedScreenState,
history,
// eslint-disable-next-line no-shadow
initializeThreeBox,
} = this.props;
leaveImportSeedScreenState();
@ -49,7 +45,6 @@ class RestoreVaultPage extends Component {
legacy_event: true,
},
});
initializeThreeBox();
history.push(DEFAULT_ROUTE);
};
@ -139,6 +134,5 @@ export default connect(
},
createNewVaultAndRestore: (pw, seed) =>
dispatch(createNewVaultAndRestore(pw, seed)),
initializeThreeBox: () => dispatch(initializeThreeBox()),
}),
)(RestoreVaultPage);

View File

@ -1,6 +1,5 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ToggleButton from '../../../components/ui/toggle-button';
import TextField from '../../../components/ui/text-field';
import Button from '../../../components/ui/button';
@ -50,9 +49,6 @@ export default class AdvancedTab extends PureComponent {
setAutoLockTimeLimit: PropTypes.func.isRequired,
setShowFiatConversionOnTestnetsPreference: PropTypes.func.isRequired,
setShowTestNetworks: PropTypes.func.isRequired,
threeBoxSyncingAllowed: PropTypes.bool.isRequired,
setThreeBoxSyncingPermission: PropTypes.func.isRequired,
threeBoxDisabled: PropTypes.bool.isRequired,
setIpfsGateway: PropTypes.func.isRequired,
ipfsGateway: PropTypes.string.isRequired,
ledgerTransportType: PropTypes.oneOf(Object.values(LEDGER_TRANSPORT_TYPES)),
@ -572,55 +568,6 @@ export default class AdvancedTab extends PureComponent {
);
}
renderThreeBoxControl() {
const { t } = this.context;
const {
threeBoxSyncingAllowed,
setThreeBoxSyncingPermission,
threeBoxDisabled,
} = this.props;
let allowed = threeBoxSyncingAllowed;
let description = t('syncWithThreeBoxDescription');
if (threeBoxDisabled) {
allowed = false;
description = t('syncWithThreeBoxDisabled');
}
return (
<div
ref={this.settingsRefs[9]}
className="settings-page__content-row"
data-testid="advanced-setting-3box"
>
<div className="settings-page__content-item">
<span>{t('syncWithThreeBox')}</span>
<div className="settings-page__content-description">
{description}
</div>
</div>
<div
className={classnames('settings-page__content-item', {
'settings-page__content-item--disabled': threeBoxDisabled,
})}
>
<div className="settings-page__content-item-col">
<ToggleButton
value={allowed}
onToggle={(value) => {
if (!threeBoxDisabled) {
setThreeBoxSyncingPermission(!value);
}
}}
offLabel={t('off')}
onLabel={t('on')}
/>
</div>
</div>
</div>
);
}
renderLedgerLiveControl() {
const { t } = this.context;
const {
@ -884,7 +831,6 @@ export default class AdvancedTab extends PureComponent {
{this.renderAutoLockTimeLimit()}
{this.renderUserDataBackup()}
{this.renderRestoreUserData()}
{this.renderThreeBoxControl()}
{this.renderIpfsGatewayControl()}
{notUsingFirefox ? this.renderLedgerLiveControl() : null}
{this.renderDismissSeedBackupReminderControl()}

View File

@ -19,11 +19,8 @@ describe('AdvancedTab Component', () => {
setAutoLockTimeLimit={setAutoLockTimeLimitSpy}
setIpfsGateway={() => undefined}
setShowFiatConversionOnTestnetsPreference={() => undefined}
setThreeBoxSyncingPermission={() => undefined}
setShowTestNetworks={toggleTestnet}
showTestNetworks={false}
threeBoxDisabled
threeBoxSyncingAllowed={false}
ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F}
setLedgerTransportPreference={() => undefined}
setDismissSeedBackUpReminder={() => undefined}
@ -42,12 +39,8 @@ describe('AdvancedTab Component', () => {
);
});
it('should render correctly when threeBoxFeatureFlag', () => {
expect(component.find('.settings-page__content-row')).toHaveLength(16);
});
it('should render backup button', () => {
expect(component.find('.settings-page__content-row')).toHaveLength(16);
expect(component.find('.settings-page__content-row')).toHaveLength(15);
expect(
component
@ -78,7 +71,7 @@ describe('AdvancedTab Component', () => {
});
it('should render restore button', () => {
expect(component.find('.settings-page__content-row')).toHaveLength(16);
expect(component.find('.settings-page__content-row')).toHaveLength(15);
expect(
component
@ -116,9 +109,6 @@ describe('AdvancedTab Component', () => {
setAutoLockTimeLimit={setAutoLockTimeLimitSpy}
setIpfsGateway={() => undefined}
setShowFiatConversionOnTestnetsPreference={() => undefined}
setThreeBoxSyncingPermission={() => undefined}
threeBoxDisabled
threeBoxSyncingAllowed={false}
ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F}
setLedgerTransportPreference={() => undefined}
setDismissSeedBackUpReminder={() => undefined}
@ -161,11 +151,8 @@ describe('AdvancedTab Component', () => {
setAutoLockTimeLimit={setAutoLockTimeLimitSpy}
setIpfsGateway={() => undefined}
setShowFiatConversionOnTestnetsPreference={() => undefined}
setThreeBoxSyncingPermission={() => undefined}
setShowTestNetworks={toggleTestnet}
showTestNetworks={false}
threeBoxDisabled
threeBoxSyncingAllowed={false}
ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F}
setLedgerTransportPreference={() => undefined}
setDismissSeedBackUpReminder={() => undefined}

View File

@ -8,8 +8,6 @@ import {
setShowFiatConversionOnTestnetsPreference,
setShowTestNetworks,
setAutoLockTimeLimit,
setThreeBoxSyncingPermission,
turnThreeBoxSyncingOnAndInitialize,
setUseNonceField,
setIpfsGateway,
setLedgerTransportPreference,
@ -29,8 +27,6 @@ export const mapStateToProps = (state) => {
} = state;
const {
featureFlags: { sendHexData, advancedInlineGas } = {},
threeBoxSyncingAllowed,
threeBoxDisabled,
useNonceField,
ipfsGateway,
ledgerTransportType,
@ -52,8 +48,6 @@ export const mapStateToProps = (state) => {
showFiatInTestnets,
showTestNetworks,
autoLockTimeLimit,
threeBoxSyncingAllowed,
threeBoxDisabled,
useNonceField,
ipfsGateway,
ledgerTransportType,
@ -84,13 +78,6 @@ export const mapDispatchToProps = (dispatch) => {
setAutoLockTimeLimit: (value) => {
return dispatch(setAutoLockTimeLimit(value));
},
setThreeBoxSyncingPermission: (newThreeBoxSyncingState) => {
if (newThreeBoxSyncingState) {
dispatch(turnThreeBoxSyncingOnAndInitialize());
} else {
dispatch(setThreeBoxSyncingPermission(newThreeBoxSyncingState));
}
},
setIpfsGateway: (value) => {
return dispatch(setIpfsGateway(value));
},

View File

@ -11,8 +11,6 @@ export default {
sendHexData: { control: 'boolean' },
advancedInlineGas: { control: 'boolean' },
showFiatInTestnets: { control: 'boolean' },
threeBoxSyncingAllowed: { control: 'boolean' },
threeBoxDisabled: { control: 'boolean' },
useLedgerLive: { control: 'boolean' },
dismissSeedBackUpReminder: { control: 'boolean' },
setAutoLockTimeLimit: { action: 'setAutoLockTimeLimit' },
@ -20,7 +18,6 @@ export default {
action: 'setShowFiatConversionOnTestnetsPreference',
},
setShowTestNetworks: { action: 'setShowTestNetworks' },
setThreeBoxSyncingPermission: { action: 'setThreeBoxSyncingPermission' },
setIpfsGateway: { action: 'setIpfsGateway' },
setLedgerTransportPreference: { action: 'setLedgerTransportPreference' },
setDismissSeedBackUpReminder: { action: 'setDismissSeedBackUpReminder' },
@ -44,7 +41,6 @@ export const DefaultStory = (args) => {
sendHexData,
advancedInlineGas,
showFiatInTestnets,
threeBoxSyncingAllowed,
dismissSeedBackUpReminder,
},
updateArgs,
@ -74,12 +70,6 @@ export const DefaultStory = (args) => {
});
};
const handleThreeBoxSyncingAllowed = () => {
updateArgs({
threeBoxSyncingAllowed: !threeBoxSyncingAllowed,
});
};
const handleDismissSeedBackUpReminder = () => {
updateArgs({
dismissSeedBackUpReminder: !dismissSeedBackUpReminder,
@ -97,8 +87,6 @@ export const DefaultStory = (args) => {
setAdvancedInlineGasFeatureFlag={handleAdvancedInlineGas}
showFiatInTestnets={showFiatInTestnets}
setShowFiatConversionOnTestnetsPreference={handleShowFiatInTestnets}
threeBoxSyncingAllowed={threeBoxSyncingAllowed}
setThreeBoxSyncingPermission={handleThreeBoxSyncingAllowed}
dismissSeedBackUpReminder={dismissSeedBackUpReminder}
setDismissSeedBackUpReminder={handleDismissSeedBackUpReminder}
ipfsGateway="ipfs-gateway"
@ -114,8 +102,6 @@ DefaultStory.args = {
sendHexData: false,
advancedInlineGas: false,
showFiatInTestnets: false,
threeBoxSyncingAllowed: false,
threeBoxDisabled: false,
useLedgerLive: false,
dismissSeedBackUpReminder: false,
};

View File

@ -911,7 +911,6 @@ function getAllowedAnnouncementIds(state) {
const supportsWebHid = window.navigator.hid !== undefined;
const currentlyUsingLedgerLive =
getLedgerTransportType(state) === LEDGER_TRANSPORT_TYPES.LIVE;
const { threeBoxSyncingAllowed } = state.metamask;
return {
1: false,
@ -927,7 +926,7 @@ function getAllowedAnnouncementIds(state) {
11: true,
12: false,
13: false,
14: threeBoxSyncingAllowed,
14: false,
15: true,
};
}

View File

@ -3337,108 +3337,6 @@ export function setSeedPhraseBackedUp(seedPhraseBackupState) {
};
}
export function initializeThreeBox() {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod('initializeThreeBox', [], (err) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve();
});
});
};
}
export function setShowRestorePromptToFalse() {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod('setShowRestorePromptToFalse', [], (err) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve();
});
});
};
}
export function turnThreeBoxSyncingOn() {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod('turnThreeBoxSyncingOn', [], (err) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve();
});
});
};
}
export function restoreFromThreeBox(accountAddress) {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod('restoreFromThreeBox', [accountAddress], (err) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve();
});
});
};
}
export function getThreeBoxLastUpdated() {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod('getThreeBoxLastUpdated', [], (err, lastUpdated) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve(lastUpdated);
});
});
};
}
export function setThreeBoxSyncingPermission(threeBoxSyncingAllowed) {
return (dispatch) => {
return new Promise((resolve, reject) => {
callBackgroundMethod(
'setThreeBoxSyncingPermission',
[threeBoxSyncingAllowed],
(err) => {
if (err) {
dispatch(displayWarning(err.message));
reject(err);
return;
}
resolve();
},
);
});
};
}
export function turnThreeBoxSyncingOnAndInitialize() {
return async (dispatch) => {
await dispatch(setThreeBoxSyncingPermission(true));
await dispatch(turnThreeBoxSyncingOn());
await dispatch(initializeThreeBox(true));
};
}
export function setNextNonce(nextNonce) {
return {
type: actionConstants.SET_NEXT_NONCE,

4023
yarn.lock

File diff suppressed because it is too large Load Diff