Skip to content

Commit

Permalink
Fixes verified message on tipping banner
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Oct 29, 2020
1 parent 73b2027 commit 42ff670
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,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 42ff670

Please sign in to comment.