Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Show "loading" when payments balance is loading
Browse files Browse the repository at this point in the history
Fix #3778
Fix #3785 or at least a gentle fallback

Auditors: @diracdeltas @bbondy

Test Plan:

Offline case:
1. Disable internet
2. Re/open Brave
3. Open Preferences -> Payments
4. Observe that account balance is "loading..." and not 0

Online case:
1. Open Brave
2. Open Preferences -> Payments
3. Observe account balance is accurate
  • Loading branch information
ayumi committed Sep 7, 2016
1 parent f63f2e4 commit 40b5072
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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
accountBalanceLoading=loading...
monthlyBudget=monthly budget
status=status
createWallet=create wallet
Expand Down
14 changes: 10 additions & 4 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,16 @@ class PaymentsTab extends ImmutableComponent {
<tr>
<td>
<span id='fundsAmount'>
{this.btcToCurrencyString(this.props.ledgerData.get('balance'))}
<a href='https://brave.com/Payments_FAQ.html' target='_blank'>
<span className='fa fa-question-circle fundsFAQ' />
</a>
{
!(this.props.ledgerData.get('balance') === undefined || this.props.ledgerData.get('balance') === null)

This comment has been minimized.

Copy link
@bbondy

bbondy Sep 8, 2016

Member

sorry just working through my reviews in sequence, thanks for fixing here.

? <span>
{this.btcToCurrencyString(this.props.ledgerData.get('balance'))}
<a href='https://brave.com/Payments_FAQ.html' target='_blank'>
<span className='fa fa-question-circle fundsFAQ' />
</a>
</span>
: <span data-l10n-id='accountBalanceLoading' />
}
</span>
{this.walletButton}
{this.paymentHistoryButton}
Expand Down

0 comments on commit 40b5072

Please sign in to comment.