Merge pull request #4334 from brave/issues/7666

Fixes unable to get ad tokens if tokens are not ready
This commit is contained in:
Terry Mancey
2020-01-09 16:34:49 +00:00
committed by GitHub
@@ -307,11 +307,6 @@ void RefillTokens::OnGetSignedTokens(
void RefillTokens::OnRefill(
const Result result,
const bool should_retry) {
blinded_tokens_.clear();
tokens_.clear();
confirmations_->SaveState();
if (result != SUCCESS) {
BLOG(ERROR) << "Failed to refill tokens";
@@ -323,6 +318,10 @@ void RefillTokens::OnRefill(
return;
}
blinded_tokens_.clear();
tokens_.clear();
confirmations_->SaveState();
BLOG(INFO) << "Successfully refilled tokens";
}