Skip to content

Commit

Permalink
Fixes connected message for publisher banner
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Mar 4, 2020
1 parent 97d4b04 commit 8bb54cc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/brave_rewards/resources/tip/components/siteBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,17 @@ class Banner extends React.Component<Props, State> {
return false
}

const hasAnonBalance = wallets['anonymous'] && wallets['anonymous'] > 0
let nonUserFunds = 0

return connected && !hasAnonBalance
if (wallets['anonymous']) {
nonUserFunds += wallets['anonymous']
}

if (wallets['blinded']) {
nonUserFunds += wallets['blinded']
}

return connected && nonUserFunds === 0
}

render () {
Expand Down

0 comments on commit 8bb54cc

Please sign in to comment.