diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 5b90a71ff..cea1b3cc3 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -205,9 +205,6 @@ "deleteNetwork": { "message": "አውታረ መረብ ይሰረዝ?" }, - "deleteNetworkDescription": { - "message": "ይህን አውታረ መረብ ለመሰረዝ እንደሚፈልጉ እርግጠኛ ነዎት?" - }, "details": { "message": "ዝርዝሮች" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 0d7e27e52..1be520429 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -218,9 +218,6 @@ "deleteNetwork": { "message": "هل تريد حذف الشبكة؟" }, - "deleteNetworkDescription": { - "message": "هل أنت متأكد أنك تريد حذف هذه الشبكة؟" - }, "details": { "message": "التفاصيل" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 81ea9db35..3743fcbf0 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Да се изтрие ли мрежата?" }, - "deleteNetworkDescription": { - "message": "Наистина ли искате да изтриете тази мрежа?" - }, "details": { "message": "Подробности" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index e9fc84fe1..941fb82da 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -211,9 +211,6 @@ "deleteNetwork": { "message": "নেটওয়ার্ক মুছবেন?" }, - "deleteNetworkDescription": { - "message": "আপনি কি এই নেটওয়ার্কটি মোছার বিষয়ে নিশ্চিত?" - }, "details": { "message": "বিশদ বিবরণ" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index b4863d54d..d5abf0507 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -211,9 +211,6 @@ "deleteNetwork": { "message": "Esborrar Xarxa?" }, - "deleteNetworkDescription": { - "message": "Estàs segur que vols eliminar aquesta xarxa?" - }, "details": { "message": "Detalls" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index d4b56c806..85f449875 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Slet Netværk?" }, - "deleteNetworkDescription": { - "message": "Er du sikker på, at du vil slette dette netværk?" - }, "details": { "message": "Detaljer" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 5aab2dce5..0b04f0b38 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Netzwerk löschen?" }, - "deleteNetworkDescription": { - "message": "Sind Sie sicher, dass Sie dieses Netzwerk löschen möchten?" - }, "deposit": { "message": "Einzahlung" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 276525d9d..08c2c18a1 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Διαγραφή Δικτύου;" }, - "deleteNetworkDescription": { - "message": "Θέλετε σίγουρα να διαγράψετε αυτό το δίκτυο;" - }, "deposit": { "message": "Κατάθεση" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 545a84f82..3a80d75ae 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1120,8 +1120,12 @@ "deleteNetwork": { "message": "Delete network?" }, - "deleteNetworkDescription": { - "message": "Are you sure you want to delete this network?" + "deleteNetworkIntro": { + "message": "If you delete this network, you will need to add it again to view your assets in this network" + }, + "deleteNetworkTitle": { + "message": "Delete $1 network?", + "description": "$1 represents the name of the network" }, "deposit": { "message": "Deposit" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 4eba61bfd..1b5cc399b 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "¿Eliminar red?" }, - "deleteNetworkDescription": { - "message": "¿Está seguro de que quiere eliminar esta red?" - }, "deposit": { "message": "Depositar" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index bacd3569a..39bf031c3 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -584,9 +584,6 @@ "deleteNetwork": { "message": "¿Eliminar red?" }, - "deleteNetworkDescription": { - "message": "¿Está seguro de que quiere eliminar esta red?" - }, "description": { "message": "Descripción" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index daaa5789a..073f73d75 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Võrk kustutada?" }, - "deleteNetworkDescription": { - "message": "Olete kindel, et soovite selle võrgu kustutada?" - }, "details": { "message": "Üksikasjad" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 7745c6653..cf24c0c61 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "شبکه حذف شود؟" }, - "deleteNetworkDescription": { - "message": "آیا مطمئن هستید که این شبکه حذف شود؟" - }, "details": { "message": "جزئیات" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index a8ba1bdf8..478620170 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Poistetaanko verkko?" }, - "deleteNetworkDescription": { - "message": "Haluatko varmasti poistaa tämän verkon?" - }, "details": { "message": "Tiedot" }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index bda447cd7..b99f5a5ea 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -190,9 +190,6 @@ "deleteNetwork": { "message": "I-delete ang Network?" }, - "deleteNetworkDescription": { - "message": "Sigurado ka bang gusto mong i-delete ang network na ito?" - }, "details": { "message": "Mga Detalye" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index a6c970a92..4d3f53a91 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Supprimer le réseau ?" }, - "deleteNetworkDescription": { - "message": "Souhaitez-vous vraiment supprimer ce réseau ?" - }, "deposit": { "message": "Effectuez un dépôt" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 8d1edf21e..15dd5adac 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "למחוק את הרשת?" }, - "deleteNetworkDescription": { - "message": "הנך בטוח/ה שברצונך למחוק רשת זו?" - }, "details": { "message": "פרטים" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 7d28e21f8..346c660cf 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "नेटवर्क हटाएं?" }, - "deleteNetworkDescription": { - "message": "क्या आप वाकई इस नेटवर्क को हटाना चाहते हैं?" - }, "deposit": { "message": "जमा करें" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index ecec0755d..de36eb424 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Izbrisati mrežu?" }, - "deleteNetworkDescription": { - "message": "Sigurno želite izbrisati ovu mrežu?" - }, "details": { "message": "Detalji" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 428077773..a1373e469 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Törli a hálózatot?" }, - "deleteNetworkDescription": { - "message": "Biztosan törli ezt a hálózatot?" - }, "details": { "message": "Részletek" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index d0ae219b1..02a837c40 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Hapus jaringan?" }, - "deleteNetworkDescription": { - "message": "Anda yakin ingin menghapus jaringan ini?" - }, "deposit": { "message": "Deposit" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 05b14eaaf..a301f751f 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -719,9 +719,6 @@ "deleteNetwork": { "message": "Cancella la rete?" }, - "deleteNetworkDescription": { - "message": "Sei sicuro di voler eliminare questa rete?" - }, "deprecatedTestNetworksLink": { "message": "Scopri di più" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index cd8f38e9a..990ea54d1 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "ネットワークを削除しますか?" }, - "deleteNetworkDescription": { - "message": "このネットワークを削除しますか?" - }, "deposit": { "message": "入金" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 64a3052ee..c4138b3a8 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "ನೆಟ್‌ವರ್ಕ್ ಅಳಿಸುವುದೇ?" }, - "deleteNetworkDescription": { - "message": "ನೀವು ಈ ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ಖಚಿತವಾಗಿ ಅಳಿಸಲು ಬಯಸುತ್ತೀರಾ?" - }, "details": { "message": "ವಿವರಗಳು" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 4f354063b..8cc518f6d 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "네트워크를 삭제할까요?" }, - "deleteNetworkDescription": { - "message": "이 네트워크를 삭제할까요?" - }, "deposit": { "message": "예치" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index f776afc2e..36d58197b 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Panaikinti tinklą?" }, - "deleteNetworkDescription": { - "message": "Ar tikrai norite panaikinti šį tinklą?" - }, "details": { "message": "Išsami informacija" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index d3d35c00f..70e2a3333 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Dzēst tīklu?" }, - "deleteNetworkDescription": { - "message": "Vai tiešām vēlaties dzēst šo tīklu?" - }, "details": { "message": "Informācija" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 86464cf6e..e1ff1b6e3 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Padamkan Rangkaian?" }, - "deleteNetworkDescription": { - "message": "Anda pasti anda ingin padamkan rangkaian ini?" - }, "details": { "message": "Butiran" }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index a575ffdcb..e53ecfc02 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -211,9 +211,6 @@ "deleteNetwork": { "message": "Slette nettverk? " }, - "deleteNetworkDescription": { - "message": "Er du sikker på at du vil slette dette nettverket?" - }, "details": { "message": "Detaljer" }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 1a2f9ff87..33e995e54 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -409,9 +409,6 @@ "deleteNetwork": { "message": "I-delete ang Network?" }, - "deleteNetworkDescription": { - "message": "Sigurado ka bang gusto mong i-delete ang network na ito?" - }, "details": { "message": "Mga Detalye" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index b595f5322..32664ebda 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Usunąć sieć?" }, - "deleteNetworkDescription": { - "message": "Czy na pewno chcesz usunąć tę sieć?" - }, "details": { "message": "Szczegóły" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 3a8ecd496..59352f0f3 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Excluir rede?" }, - "deleteNetworkDescription": { - "message": "Quer mesmo excluir essa rede?" - }, "deposit": { "message": "Depositar" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 3afad9f57..20e8daa1e 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -584,9 +584,6 @@ "deleteNetwork": { "message": "Excluir rede?" }, - "deleteNetworkDescription": { - "message": "Quer mesmo excluir essa rede?" - }, "description": { "message": "Descrição" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index 5788f8b07..d39e5b4e6 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Ștergeți rețeaua?" }, - "deleteNetworkDescription": { - "message": "Sigur vreți să ștergeți această rețea?" - }, "details": { "message": "Detalii" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index f8910aa90..4e36e6b1a 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Удалить сеть?" }, - "deleteNetworkDescription": { - "message": "Уверены, что хотите удалить эту сеть?" - }, "deposit": { "message": "Внести деньги" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 21c7a8f9e..3dcf16933 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -208,9 +208,6 @@ "deleteNetwork": { "message": "Odstrániť sieť?" }, - "deleteNetworkDescription": { - "message": "Naozaj chcete túto sieť odstrániť?" - }, "details": { "message": "Podrobnosti" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index e041577a2..92c40f8d4 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Izbrišem to omrežje?" }, - "deleteNetworkDescription": { - "message": "Ali ste prepričani, da želite izbrisati to omrežje?" - }, "details": { "message": "Podrobnosti" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index db06d7a5c..e061fa55a 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -211,9 +211,6 @@ "deleteNetwork": { "message": "Da li želite da obrišete mrežu?" }, - "deleteNetworkDescription": { - "message": "Da li ste sigurni da želite da izbrišete ovu mrežu?" - }, "details": { "message": "Детаљи" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 4c07edfb9..9f02c1ce2 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -208,9 +208,6 @@ "deleteNetwork": { "message": "Radera nätverk?" }, - "deleteNetworkDescription": { - "message": "Är du säker på att du vill ta bort detta nätverk?" - }, "details": { "message": "Info" }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index e8921b243..0ddfe8ac6 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -208,9 +208,6 @@ "deleteNetwork": { "message": "Futa Mtandao?" }, - "deleteNetworkDescription": { - "message": "Una uhakika unataka kufuta mtandao huu?" - }, "details": { "message": "Maelezo" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 9a4ff7aab..335150f97 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "I-delete ang network?" }, - "deleteNetworkDescription": { - "message": "Sigurado ka bang gusto mong i-delete ang network na ito?" - }, "deposit": { "message": "Deposito" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index b7497e238..adad63696 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Ağı Sil?" }, - "deleteNetworkDescription": { - "message": "Bu ağı silmek istediğinizden emin misiniz?" - }, "deposit": { "message": "Para Yatır" }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 3f4fb4f24..e9505d2b2 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -214,9 +214,6 @@ "deleteNetwork": { "message": "Видалити мережу?" }, - "deleteNetworkDescription": { - "message": "Ви впевнені, що хочете видалити цю мережу?" - }, "details": { "message": "Деталі" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index e5b500bf4..f76a0beb4 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "Xóa mạng?" }, - "deleteNetworkDescription": { - "message": "Bạn có chắc chắn muốn xóa mạng này không?" - }, "deposit": { "message": "Nạp" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 43dbffbbb..e65b42b81 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -908,9 +908,6 @@ "deleteNetwork": { "message": "删除网络?" }, - "deleteNetworkDescription": { - "message": "您确定要删除该网络吗?" - }, "deposit": { "message": "存入" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index c1f1b9e65..276d101e5 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -411,9 +411,6 @@ "deleteNetwork": { "message": "刪除網路?" }, - "deleteNetworkDescription": { - "message": "你確定要刪除網路嗎?" - }, "details": { "message": "詳情" }, diff --git a/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap b/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap index 7d90f75ae..07bc3f75d 100644 --- a/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap +++ b/ui/components/app/modals/confirm-delete-network/__snapshots__/confirm-delete-network.test.js.snap @@ -14,12 +14,12 @@ exports[`Confirm Delete Network should match snapshot 1`] = ` diff --git a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js index a4c9f9c23..d5173f857 100644 --- a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js +++ b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js @@ -8,21 +8,22 @@ export default class ConfirmDeleteNetwork extends PureComponent { removeNetworkConfiguration: PropTypes.func.isRequired, onConfirm: PropTypes.func.isRequired, target: PropTypes.string.isRequired, + networkNickname: PropTypes.string.isRequired, }; static contextTypes = { t: PropTypes.func, }; - handleDelete = () => { - this.props.removeNetworkConfiguration(this.props.target).then(() => { - this.props.onConfirm(); - this.props.hideModal(); - }); + handleDelete = async () => { + await this.props.removeNetworkConfiguration(this.props.target); + this.props.onConfirm(); + this.props.hideModal(); }; render() { const { t } = this.context; + const { networkNickname } = this.props; return ( ); diff --git a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js index 8a74f0d31..5ee9ff4e2 100644 --- a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js +++ b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js @@ -2,8 +2,16 @@ import { connect } from 'react-redux'; import { compose } from 'redux'; import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'; import { removeNetworkConfiguration } from '../../../../store/actions'; +import { getNetworkConfigurations } from '../../../../selectors'; import ConfirmDeleteNetwork from './confirm-delete-network.component'; +const mapStateToProps = (state, ownProps) => { + const networkConfigurations = getNetworkConfigurations(state); + const networkNickname = networkConfigurations[ownProps.target].nickname; + + return { networkNickname }; +}; + const mapDispatchToProps = (dispatch) => { return { removeNetworkConfiguration: (target) => @@ -13,5 +21,5 @@ const mapDispatchToProps = (dispatch) => { export default compose( withModalProps, - connect(null, mapDispatchToProps), + connect(mapStateToProps, mapDispatchToProps), )(ConfirmDeleteNetwork); diff --git a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js index 6d1357828..467171181 100644 --- a/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js +++ b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js @@ -10,7 +10,7 @@ describe('Confirm Delete Network', () => { hideModal: jest.fn(), onConfirm: jest.fn(), removeNetworkConfiguration: jest.fn().mockResolvedValue(), - target: 'target', + target: 'testNetworkConfigurationId', }; it('should match snapshot', () => { @@ -23,6 +23,17 @@ describe('Confirm Delete Network', () => { expect(container).toMatchSnapshot(); }); + it('should mention network name in modal', () => { + const mockStore = configureMockStore()(mockState); + const { getByText } = renderWithProvider( + , + mockStore, + ); + const expectedTitle = 'Delete Custom Mainnet RPC network?'; + + expect(getByText(expectedTitle)).toBeInTheDocument(); + }); + it('clicks cancel to hide modal', async () => { const { queryByText } = renderWithProvider( ,