Skip to content

Commit

Permalink
Fixes blank panel
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc authored and bsclifton committed Sep 13, 2019
1 parent a0f7174 commit 760bf2e
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 @@ -195,7 +195,8 @@ export class RewardsPanel extends React.Component<Props, State> {
balance
} = 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 @@ -222,7 +223,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}
connectedWallet={false}
showCopy={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,11 @@ export class Panel extends React.Component<Props, State> {
}

render () {
const { pendingContributionTotal, enabledAC } = this.props.rewardsPanelData
const { total, rates } = this.props.rewardsPanelData.balance
const { pendingContributionTotal, enabledAC, 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 760bf2e

Please sign in to comment.