Skip to content

Commit

Permalink
Merge pull request #1160 from brave/non-verified-fix
Browse files Browse the repository at this point in the history
Fixes panel for non-verified sites
  • Loading branch information
NejcZdovc authored Dec 20, 2018
2 parents 12b666a + f3dbc93 commit b4a2b38
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions vendor/bat-native-ledger/src/bat_publishers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@ void BatPublishers::saveVisitInternal(

bool verified = isVerified(publisher_id);

if (!ledger_->GetPublisherAllowNonVerified() && !verified) {
return;
}

bool new_visit = false;
if (!publisher_info.get()) {
new_visit = true;
Expand All @@ -250,7 +246,10 @@ void BatPublishers::saveVisitInternal(
visit_data.local_year));
}

if (!ignoreMinTime(publisher_id) && duration < getPublisherMinVisitTime()) {
// set duration to 0 if you don't have sufficient visit time
// or if you set ac to only verified and site is not verified
if ((!ignoreMinTime(publisher_id) && duration < getPublisherMinVisitTime()) ||
(!ledger_->GetPublisherAllowNonVerified() && !verified)) {
duration = 0;
}

Expand Down

0 comments on commit b4a2b38

Please sign in to comment.