-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BAT Confirmations should not be started if Rewards is disabled #5424
Conversation
@@ -1277,6 +1277,10 @@ - (void)setBooleanState:(const std::string&)name value:(bool)value | |||
- (bool)getBooleanState:(const std::string&)name | |||
{ | |||
const auto key = [NSString stringWithUTF8String:name.c_str()]; | |||
if (![self.prefs objectForKey:key]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kylehickinson default to NO
for unknown keys to support kStateEnabled
and kStateEnabledMigrated
boolean state from the desktop which are not supported on iOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
DCHECK(wallet_info_.IsValid()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This DCHECK
was causing issues when resolving this ticket as is not required as ads_rewards_->Update(wallet_info_, should_refresh);
validates if the wallet is valid
macOS failed CI, restarting macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmancey could you please check this use case:
- go to master
- enable rewards
- disable rewards
- switch to this PR
- make sure that confirmations are not initialized
- enable rewards
As far as I can see from the logs when you re-enable rewards confirmations are not initialized as code for initialization is only in initialization flow and not in toggle flow
Fixed |
Android and macOS failed CI, restarting |
@tmancey you need to rebase this one |
5e3b5f9
to
7bb35b0
Compare
Failed CI for unrelated reasons due to test-security |
Security issue open with brave/brave-browser#9578 - trying to resolve that one (doesn't block merge for this!). Changes here LGTM - but will defer to others for proper review 😄 |
vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc
Outdated
Show resolved
Hide resolved
vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc
Outdated
Show resolved
Hide resolved
CI failed due to unrelated rewards browser tests |
Resolves brave/brave-browser#9544
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
13deb15e2bd2291398c81e83812b3d76278cad57
in 0.62) to the latest nightly buildReviewer Checklist:
After-merge Checklist:
changes has landed on.