Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #2202: Display correct publisher disclaimer for connected wallets #2204

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

kylehickinson
Copy link
Collaborator

@kylehickinson kylehickinson commented Jan 15, 2020

Summary of Changes

This pull request fixes issue #2202

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Test Plan:

Panel messaging:

Anon Wallet User Wallet Connected (empty anon wallet)
unverified publisher not verified not verified
wallet connected publisher nothing not connected
verified publisher nothing nothing

Where
- not verified:
This creator has not yet signed up to receive contributions from Brave users. Any tips you send will remain in your wallet until they verify.
- not connected
This Brave Verified Creator has not yet configured their account to receive contributions from Brave Users. Any tips you send will remain in your wallet until they complete this process.

Screenshots:

Publisher: snow.fish, status: wallet_connected

Anon Panel Anon Tip
no-user-wallet-connected-pub no-user-wallet-connected-pub-tip
User Wallet Connected Panel User Wallet Connected Tip
user-wallet-connected-pib user-wallet-connected-pub-tip

Publisher: github.com, status: unverified

User Wallet Connected Panel User Wallet Connected Tip
unverified-pub unverified-pub-tip

Publisher: laurenwags.github.io, status: verified

User Wallet Connected Panel User Wallet Connected Tip
verified verified-tip

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

@@ -156,6 +157,7 @@ internal extension Strings {
static let learnMoreCreateWallet1 = NSLocalizedString("BraveRewardsLearnMoreCreateWallet1", bundle: .rewardsUI, value: "Yes, I'm In!", comment: "")
static let learnMoreBraveAdsTitle = NSLocalizedString("BraveRewardsLearnMoreBraveAdsTitle", bundle: .rewardsUI, value: "Ads", comment: "")
static let tippingUnverifiedDisclaimer = NSLocalizedString("BraveRewardsTippingUnverifiedDisclaimer", bundle: .rewardsUI, value: "NOTE: This creator has not yet signed up to receive contributions from Brave users. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
static let tippingNotConnectedDisclaimer = NSLocalizedString("BraveRewardsTippingUnverifiedDisclaimer", bundle: .rewardsUI, value: "NOTE: This Brave Verified Creator has not yet signed up to receive contributions from Brave users. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename string key


self.tippingView.overviewView.disclaimerView.isHidden = banner.status == .verified

if (state.ledger.walletBalances[.anonymous] ?? 0) > 0 || (state.ledger.walletBalances[.unblindedTokens] ?? 0) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this in two places, maybe extract to a computed property on ledger object?

@kylehickinson kylehickinson force-pushed the publisher-panel-messaging branch from 481ef74 to d3b90e8 Compare January 16, 2020 16:17
@kylehickinson kylehickinson requested a review from iccub January 16, 2020 16:17
@kylehickinson
Copy link
Collaborator Author

Same test failures on CI, merging anyways

@kylehickinson kylehickinson merged commit 0a3ac4b into development Jan 16, 2020
@kylehickinson kylehickinson deleted the publisher-panel-messaging branch January 16, 2020 16:47
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants