diff --git a/__tests__/components/__snapshots__/NetworkConfigurationTooltip.test.js.snap b/__tests__/components/__snapshots__/NetworkConfigurationTooltip.test.js.snap index 5db3051d4..ea6370292 100644 --- a/__tests__/components/__snapshots__/NetworkConfigurationTooltip.test.js.snap +++ b/__tests__/components/__snapshots__/NetworkConfigurationTooltip.test.js.snap @@ -178,10 +178,10 @@ exports[`Sidebar renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", @@ -825,10 +825,10 @@ exports[`Sidebar renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", diff --git a/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap b/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap index 490842689..ff1f7a5f0 100644 --- a/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap +++ b/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap @@ -157,10 +157,10 @@ exports[`NetworkSwitch renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", diff --git a/__tests__/components/__snapshots__/News.test.js.snap b/__tests__/components/__snapshots__/News.test.js.snap index 910e12463..047727e34 100644 --- a/__tests__/components/__snapshots__/News.test.js.snap +++ b/__tests__/components/__snapshots__/News.test.js.snap @@ -175,10 +175,10 @@ exports[`News renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", diff --git a/__tests__/components/__snapshots__/Settings.test.js.snap b/__tests__/components/__snapshots__/Settings.test.js.snap index b147c343d..a8ac8f26a 100644 --- a/__tests__/components/__snapshots__/Settings.test.js.snap +++ b/__tests__/components/__snapshots__/Settings.test.js.snap @@ -175,10 +175,10 @@ exports[`Settings renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", diff --git a/__tests__/components/__snapshots__/Sidebar.test.js.snap b/__tests__/components/__snapshots__/Sidebar.test.js.snap index 8777fcc40..cd1d63215 100644 --- a/__tests__/components/__snapshots__/Sidebar.test.js.snap +++ b/__tests__/components/__snapshots__/Sidebar.test.js.snap @@ -175,10 +175,10 @@ exports[`Sidebar renders without crashing 1`] = ` "nodeSelectSelectAutomatically": "Select automatically", "nodeSelectionInstructions": "If you’re experiencing performance issues, try selecting a custom node below", "nothingToSeeHere": "Nothing to see here!", + "notifications.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "notifications.success.accountSaved": "Account saved!", "notifications.success.receivedBlockchainInfo": "Received latest blockchain information.", "notifications.success.updatedWalletName": "Succesfully updated wallet name.", - "notificiations.failure.blockchainInfoFailure": "Failed to retrieve blockchain information.", "numberofTransactionsPending": "{transferCount, number} {transferCount, plural, one {Transfer} other {Transfers}} pending", "previousStep": "Previous Step", "print": "Print", diff --git a/app/components/FailedPanel/FailedPanel.jsx b/app/components/FailedPanel/FailedPanel.jsx index 5ea4675d3..d6c731b5c 100644 --- a/app/components/FailedPanel/FailedPanel.jsx +++ b/app/components/FailedPanel/FailedPanel.jsx @@ -6,35 +6,49 @@ import { Link } from 'react-router-dom' import Panel from '../Panel' import styles from './FailedPanel.scss' import { ROUTES } from '../../core/constants' +import Loader from '../Loader' type Props = { className: ?string, title: ?string, onRetry: ?Function, + loading: boolean, } export default class LoadingPanel extends React.Component { static defaultProps = { title: 'Failed', onRetry: null, + loading: false, } render() { + const { loading, className } = this.props + return ( - Failed to load. {this.renderRetry()} or{' '} - - select a different node. - + {loading ? ( + + ) : ( + + Failed to load. {this.renderRetry()} or{' '} + + select a different node. + + + )} ) } diff --git a/app/components/FailedPanel/FailedPanel.scss b/app/components/FailedPanel/FailedPanel.scss index 9bcbce9cf..3fcb27ec2 100644 --- a/app/components/FailedPanel/FailedPanel.scss +++ b/app/components/FailedPanel/FailedPanel.scss @@ -1,6 +1,8 @@ -.failedPanel { - .content { - text-align: center; - vertical-align: middle; - } +.loadingContent { + text-align: center; + vertical-align: middle; + position: relative; + min-height: 100px; + text-align: center; + vertical-align: middle; } diff --git a/app/components/FailedPanel/index.js b/app/components/FailedPanel/index.js index d401b434e..c5b227814 100644 --- a/app/components/FailedPanel/index.js +++ b/app/components/FailedPanel/index.js @@ -1 +1,17 @@ -export { default } from './FailedPanel' +// @flow +import { compose } from 'recompose' + +import FailedPanel from './FailedPanel' +import balancesActions from '../../actions/balancesActions' +import withLoadingProp from '../../hocs/withLoadingProp' +import withFailureNotification from '../../hocs/withFailureNotification' + +export default compose( + withLoadingProp(balancesActions), + withFailureNotification( + balancesActions, + 'notifications.failure.blockchainInfoFailure', + {}, + true, + ), +)(FailedPanel) diff --git a/app/containers/Receive/index.js b/app/containers/Receive/index.js index a0e9c0c9c..c6cd8bd91 100644 --- a/app/containers/Receive/index.js +++ b/app/containers/Receive/index.js @@ -112,7 +112,7 @@ export default compose( ), withFailureNotification( balancesActions, - 'notificiations.failure.blockchainInfoFailure', + 'notifications.failure.blockchainInfoFailure', {}, true, ), diff --git a/app/containers/Send/index.js b/app/containers/Send/index.js index e402df277..8a02bc4a5 100644 --- a/app/containers/Send/index.js +++ b/app/containers/Send/index.js @@ -98,7 +98,7 @@ export default compose( ), withFailureNotification( balancesActions, - 'notificiations.failure.blockchainInfoFailure', + 'notifications.failure.blockchainInfoFailure', {}, true, ), diff --git a/app/containers/TransactionHistory/index.js b/app/containers/TransactionHistory/index.js index 9bf366446..06c3bde8a 100644 --- a/app/containers/TransactionHistory/index.js +++ b/app/containers/TransactionHistory/index.js @@ -46,7 +46,7 @@ export default compose( ), withFailureNotification( balancesActions, - 'notificiations.failure.blockchainInfoFailure', + 'notifications.failure.blockchainInfoFailure', {}, true, ), diff --git a/app/translations/arabic.js b/app/translations/arabic.js index 7af66e75b..e84edb2a7 100644 --- a/app/translations/arabic.js +++ b/app/translations/arabic.js @@ -138,7 +138,7 @@ const NOTIFICATIONS = { 'تلقي أحدث معلومات blockchain.', 'notifications.success.accountSaved': 'تم حفظ الحساب!', 'notifications.success.updatedWalletName': 'تم تحديث اسم المحفظة بنجاح.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'فشل في استعادة معلومات blockchain.', } diff --git a/app/translations/chinese.js b/app/translations/chinese.js index 6cb269b08..4f42b35eb 100644 --- a/app/translations/chinese.js +++ b/app/translations/chinese.js @@ -128,7 +128,7 @@ const NOTIFICATIONS = { 'notifications.success.receivedBlockchainInfo': '收到最新的区块链信息。', 'notifications.success.accountSaved': '帐户已保存!', 'notifications.success.updatedWalletName': '成功更新了钱包名称.', - 'notificiations.failure.blockchainInfoFailure': '检索区块链信息失败。', + 'notifications.failure.blockchainInfoFailure': '检索区块链信息失败。', } const AUTH = { diff --git a/app/translations/english.js b/app/translations/english.js index b14ef7803..a74e45bf2 100644 --- a/app/translations/english.js +++ b/app/translations/english.js @@ -141,7 +141,7 @@ const NOTIFICATIONS = { 'Received latest blockchain information.', 'notifications.success.accountSaved': 'Account saved!', 'notifications.success.updatedWalletName': 'Succesfully updated wallet name.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Failed to retrieve blockchain information.', } diff --git a/app/translations/french.js b/app/translations/french.js index 621c5fae6..dadaadf26 100644 --- a/app/translations/french.js +++ b/app/translations/french.js @@ -133,7 +133,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Compte enregistré!', 'notifications.success.updatedWalletName': 'Nom du portefeuille mis à jour avec succès.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Échec de la récupération des informations de la chaîne de blocs.', } diff --git a/app/translations/german.js b/app/translations/german.js index c4b1d4eaa..d1162edb5 100644 --- a/app/translations/german.js +++ b/app/translations/german.js @@ -141,7 +141,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Konto gespeichert!', 'notifications.success.updatedWalletName': 'Erfolgreich aktualisierter Brieftaschenname.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Fehler beim Abrufen der Blockchain-Informationen.', } diff --git a/app/translations/italian.js b/app/translations/italian.js index cc909b553..ae092ad40 100644 --- a/app/translations/italian.js +++ b/app/translations/italian.js @@ -136,7 +136,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Account salvato!', 'notifications.success.updatedWalletName': 'Nome del portafoglio aggiornato con successo.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Impossibile recuperare le informazioni sulla blockchain.', } diff --git a/app/translations/korean.js b/app/translations/korean.js index da7a9d24d..c957caf48 100644 --- a/app/translations/korean.js +++ b/app/translations/korean.js @@ -124,7 +124,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': '계정이 저장되었습니다!', 'notifications.success.updatedWalletName': '지갑 이름이 성공적으로 업데이트되었습니다.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': '블록 체인 정보를 검색하지 못했습니다.', } diff --git a/app/translations/portuguese.js b/app/translations/portuguese.js index 255ca4d3c..eb165072e 100644 --- a/app/translations/portuguese.js +++ b/app/translations/portuguese.js @@ -143,7 +143,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Conta salva!', 'notifications.success.updatedWalletName': 'Nome do portfólio atualizado com sucesso.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Falha ao recuperar as informações da blockchain.', } diff --git a/app/translations/russian.js b/app/translations/russian.js index 831d74028..befd83b2f 100644 --- a/app/translations/russian.js +++ b/app/translations/russian.js @@ -142,7 +142,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Аккаунт сохранен!', 'notifications.success.updatedWalletName': 'Название кошелька успешно обновлено.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'В процессе получения информации о блокчейне произошла ошибка.', } diff --git a/app/translations/turkish.js b/app/translations/turkish.js index 78138364e..07a76c42f 100644 --- a/app/translations/turkish.js +++ b/app/translations/turkish.js @@ -137,7 +137,7 @@ const NOTIFICATIONS = { 'notifications.success.accountSaved': 'Hesap kaydedildi!', 'notifications.success.updatedWalletName': 'Cüzdan adı başarıyla güncellendi.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Blockchain bilgileri alınamadı.', } diff --git a/app/translations/vietnamese.js b/app/translations/vietnamese.js index 5728c4f74..0cea9cb28 100644 --- a/app/translations/vietnamese.js +++ b/app/translations/vietnamese.js @@ -133,7 +133,7 @@ const NOTIFICATIONS = { 'Nhận được thông tin blockchain mới nhất.', 'notifications.success.accountSaved': 'Tài khoản đã được lưu!', 'notifications.success.updatedWalletName': 'Tên ví được cập nhật thành công.', - 'notificiations.failure.blockchainInfoFailure': + 'notifications.failure.blockchainInfoFailure': 'Không thể truy xuất thông tin blockchain.', }