From 8bb54cc222519c6a74ce3890ba5e846da909dae8 Mon Sep 17 00:00:00 2001 From: NejcZdovc Date: Wed, 4 Mar 2020 11:21:08 +0100 Subject: [PATCH] Fixes connected message for publisher banner Resolves https://github.com/brave/brave-browser/issues/8512 --- .../resources/tip/components/siteBanner.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/components/brave_rewards/resources/tip/components/siteBanner.tsx b/components/brave_rewards/resources/tip/components/siteBanner.tsx index 9e18dc95fd35..f97e7ed6e783 100644 --- a/components/brave_rewards/resources/tip/components/siteBanner.tsx +++ b/components/brave_rewards/resources/tip/components/siteBanner.tsx @@ -218,9 +218,17 @@ class Banner extends React.Component { 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 () {