Skip to content

Commit

Permalink
Merge pull request #3426 from brave/white-box
Browse files Browse the repository at this point in the history
Fixes blank panel
  • Loading branch information
bsclifton committed Sep 17, 2019
2 parents 9c6ddeb + 398af14 commit 3734038
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ export class RewardsPanel extends React.Component<Props, State> {
externalWallet
} = this.props.rewardsPanelData

const converted = utils.convertBalance(balance.total.toString(), balance.rates)
const total = balance.total || 0
const converted = utils.convertBalance(total.toString(), balance.rates)

if (!walletCreated || walletCorrupted) {
return (
Expand All @@ -257,7 +258,7 @@ export class RewardsPanel extends React.Component<Props, State> {
compact={true}
contentPadding={false}
gradientTop={'249,251,252'}
balance={balance.total.toFixed(1)}
balance={total.toFixed(1)}
showSecActions={false}
showCopy={false}
grants={utils.getGrants(walletProperties.grants)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,11 @@ export class Panel extends React.Component<Props, State> {
}

render () {
const { pendingContributionTotal, enabledAC, externalWallet } = this.props.rewardsPanelData
const { total, rates } = this.props.rewardsPanelData.balance
const { pendingContributionTotal, enabledAC, externalWallet, balance } = this.props.rewardsPanelData
const { rates } = this.props.rewardsPanelData.balance
const { grants } = this.props.rewardsPanelData.walletProperties
const publisher: RewardsExtension.Publisher | undefined = this.getPublisher()
const total = balance.total || 0
const converted = utils.convertBalance(total.toString(), rates)
const notification = this.getNotification()
const notificationId = this.getNotificationProp('id', notification)
Expand Down

0 comments on commit 3734038

Please sign in to comment.