Skip to content

Commit

Permalink
Merge pull request #4829 from brave/connected-message-tip
Browse files Browse the repository at this point in the history
Fixes connected message for publisher banner
  • Loading branch information
NejcZdovc authored Mar 4, 2020
2 parents f90064d + 8bb54cc commit fe57c26
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 fe57c26

Please sign in to comment.