diff --git a/include/bat/ledger/ledger_callback_handler.h b/include/bat/ledger/ledger_callback_handler.h index bbef7779177a..a75b3484b379 100644 --- a/include/bat/ledger/ledger_callback_handler.h +++ b/include/bat/ledger/ledger_callback_handler.h @@ -21,11 +21,12 @@ LEDGER_EXPORT enum Result { CAPTCHA_FAILED = 6, NO_PUBLISHER_LIST = 7, - TOO_MANY_RESULTS, - NOT_FOUND, + TOO_MANY_RESULTS = 8, + NOT_FOUND = 9, - REGISTRATION_VERIFICATION_FAILED, - BAD_REGISTRATION_RESPONSE, + REGISTRATION_VERIFICATION_FAILED = 10, + BAD_REGISTRATION_RESPONSE = 11, + WALLET_CREATED = 12, // some more useful result codes should go here }; diff --git a/src/bat_client.cc b/src/bat_client.cc index 8e1cf0104b6d..aa5b40740002 100644 --- a/src/bat_client.cc +++ b/src/bat_client.cc @@ -198,7 +198,7 @@ void BatClient::registerPersonaCallback(bool result, resetReconcileStamp(); - ledger_->OnWalletInitialized(ledger::Result::LEDGER_OK); + ledger_->OnWalletInitialized(ledger::Result::WALLET_CREATED); } void BatClient::resetReconcileStamp() { diff --git a/src/bat_publishers.cc b/src/bat_publishers.cc index 1b07caf073a0..9a6428c7373d 100644 --- a/src/bat_publishers.cc +++ b/src/bat_publishers.cc @@ -854,8 +854,17 @@ void BatPublishers::getPublisherActivityFromUrl(uint64_t windowId, const ledger: false, ledger_->GetReconcileStamp()); - ledger_->GetPublisherInfo(filter, - std::bind(&BatPublishers::onPublisherActivity, this, _1, _2, windowId, visit_data)); + ledger::VisitData new_data; + new_data.domain = visit_data.domain; + new_data.path = visit_data.path; + new_data.local_month = visit_data.local_month; + new_data.local_year = visit_data.local_year; + new_data.name = visit_data.name; + new_data.url = visit_data.url; + new_data.favicon_url = ""; + + ledger_->GetPublisherInfo(filter, + std::bind(&BatPublishers::onPublisherActivity, this, _1, _2, windowId, new_data)); } void BatPublishers::onPublisherActivity(ledger::Result result, diff --git a/src/ledger_impl.cc b/src/ledger_impl.cc index 02b3c01b181e..021f230d8d6c 100644 --- a/src/ledger_impl.cc +++ b/src/ledger_impl.cc @@ -246,7 +246,7 @@ void LedgerImpl::OnWalletInitialized(ledger::Result result) { initializing_ = false; ledger_client_->OnWalletInitialized(result); - if (result == ledger::Result::LEDGER_OK) { + if (result == ledger::Result::LEDGER_OK || result == ledger::Result::WALLET_CREATED) { initialized_ = true; LoadPublisherList(this); Reconcile();