diff --git a/components/brave_rewards/resources/extension/brave_rewards/components/app.tsx b/components/brave_rewards/resources/extension/brave_rewards/components/app.tsx index 4c4ee40b5add..b84d3b006c29 100644 --- a/components/brave_rewards/resources/extension/brave_rewards/components/app.tsx +++ b/components/brave_rewards/resources/extension/brave_rewards/components/app.tsx @@ -230,7 +230,8 @@ export class RewardsPanel extends React.Component { 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 ( @@ -257,7 +258,7 @@ export class RewardsPanel extends React.Component { 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)} diff --git a/components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx b/components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx index 133cedcd944e..819bced18f62 100644 --- a/components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx +++ b/components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx @@ -565,10 +565,11 @@ export class Panel extends React.Component { } 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)