Skip to content

Commit

Permalink
Uplift of #6983 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Oct 30, 2020
1 parent d13badb commit bf910fb
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,24 @@ function showUnverifiedNotice (
case PublisherStatus.VERIFIED: return false
}

const hasNonUserFunds = Boolean(balanceInfo && (
balanceInfo.wallets['anonymous'] ||
balanceInfo.wallets['blinded']))
if (!externalWalletInfo) {
return false
}

const status = externalWalletInfo.status
const connected = publisherInfo.status === PublisherStatus.CONNECTED

const walletConnectedOrVerified = Boolean(externalWalletInfo && (
externalWalletInfo.status === ExternalWalletStatus.CONNECTED ||
externalWalletInfo.status === ExternalWalletStatus.VERIFIED))
if (connected && (
status === ExternalWalletStatus.DISCONNECTED_NOT_VERIFIED ||
status === ExternalWalletStatus.DISCONNECTED_VERIFIED)) {
return false
}

const hasNonUserFunds = Boolean(balanceInfo && (
!balanceInfo.wallets['anonymous'] &&
!balanceInfo.wallets['blinded']))

return hasNonUserFunds && walletConnectedOrVerified
return connected && hasNonUserFunds
}

function getUnverifiedNotice (
Expand Down

0 comments on commit bf910fb

Please sign in to comment.