diff --git a/app/extensions/brave/about-preferences.html b/app/extensions/brave/about-preferences.html index 41a54115210..64029ae9b40 100644 --- a/app/extensions/brave/about-preferences.html +++ b/app/extensions/brave/about-preferences.html @@ -15,6 +15,8 @@ + +
diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index eb43db0d6d9..8133749f9b3 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -26,7 +26,7 @@ paymentsSidebarText2=All transaction IP addresses are anonymized with technology paymentsSidebarText3=Brave Bitcoin Wallets are provided through a partnership with: paymentsSidebarText4=Your contributions in the form of credit cards and bank cards are handled by: accountBalance=account balance -accountBalanceConnectionError=error, can't retrieve data +accountBalanceConnectionError=An error occurred while loading your balance. accountBalanceLoading=loading… monthlyBudget=monthly budget status=status diff --git a/js/about/preferences.js b/js/about/preferences.js index d43590762d4..83ebb2e3d01 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -21,6 +21,7 @@ const settings = require('../constants/settings') const coinbaseCountries = require('../constants/coinbaseCountries') const {passwordManagers, extensionIds} = require('../constants/passwordManagers') const {startsWithOption, newTabMode, bookmarksToolbarMode} = require('../../app/common/constants/settingsEnums') +const {l10nErrorText} = require('../../app/common/lib/httpUtil') const WidevineInfo = require('../../app/renderer/components/widevineInfo') const aboutActions = require('./aboutActions') @@ -1124,6 +1125,16 @@ class PaymentsTab extends ImmutableComponent { return
} + get ledgerDataErrorText () { + const ledgerError = this.props.ledgerData.get('error') + if (!ledgerError) { + return null + } + // 'error' here is a chromium webRequest error as returned by request.js + const errorCode = ledgerError.get('error').get('errorCode') + return l10nErrorText(errorCode) + } + btcToCurrencyString (btc) { const balance = Number(btc || 0) const currency = this.props.ledgerData.get('currency') || 'USD' @@ -1183,8 +1194,11 @@ class PaymentsTab extends ImmutableComponent { { this.props.ledgerData.get('error') && this.props.ledgerData.get('error').get('caller') === 'getWalletProperties' - ? - : + ?
+
+
+
+ :
{this.fundsAmount} @@ -1192,7 +1206,7 @@ class PaymentsTab extends ImmutableComponent { {this.paymentHistoryButton} - +
} diff --git a/less/about/preferences.less b/less/about/preferences.less index 9ca6839c9ef..8f7ea28e968 100644 --- a/less/about/preferences.less +++ b/less/about/preferences.less @@ -713,7 +713,7 @@ div.nextPaymentSubmission { line-height: 24px; box-sizing: border-box; } - .nextReconcileDate { + .accountBalanceError, .nextReconcileDate { font-size: 14px; margin: 10px 0; }