Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
to get verified publisher status
  • Loading branch information
mrose17 committed Oct 22, 2016
1 parent 1e0d74c commit ad98442
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,7 @@ var synopsisNormalizer = () => {

data[i] = {
rank: i + 1,
// TBD: the `ledger-publisher` package does not currently report `verified` ...
verified: publisher.verified || false,
verified: (ledgerInfo._internal.verifiedPublishers || []).indexOf(results[i].publisher) !== -1,
site: results[i].publisher,
views: results[i].visits,
duration: duration,
Expand Down Expand Up @@ -954,6 +953,7 @@ var ledgerInfo = {
exchangeInfo: undefined,

_internal: {
verifiedPublishers: [],
exchangeExpiry: 0,
exchanges: {},
geoipExpiry: 0
Expand Down Expand Up @@ -1201,6 +1201,11 @@ var getStateInfo = (state) => {
cacheReturnValue()
}

if (!underscore.isEqual(ledgerInfo._internal.verifiedPublishers, state.verifiedPublishers)) {
ledgerInfo._internal.verifiedPublishers = state.verifiedPublishers
updatePublisherInfo()
}

ledgerInfo.transactions = []
if (!state.transactions) return updateLedgerInfo()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"keytar": "^3.0.0",
"l20n": "^3.5.1",
"ledger-balance": "^0.8.61",
"ledger-client": "^0.8.89",
"ledger-client": "^0.8.90",
"ledger-geoip": "^0.8.72",
"ledger-publisher": "^0.8.89",
"lru_cache": "^1.0.0",
Expand Down

3 comments on commit ad98442

@bbondy
Copy link
Member

@bbondy bbondy commented on ad98442 Oct 22, 2016

Choose a reason for hiding this comment

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

@mrose17 if you don't mind pls track these with an issue and have a milestone marker on the issue to indicate the expected release you want this in. As it is now I won't include this in 0.12.6 RC2 but it'd be helpful to know since I only cherry-pick in what's needed.

It can be very lightweight like use this as an example:
#5057

@mrose17
Copy link
Member Author

Choose a reason for hiding this comment

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

hmmm... i thought the mention in #3467 would have done that... (-;

@bbondy
Copy link
Member

@bbondy bbondy commented on ad98442 Oct 24, 2016

Choose a reason for hiding this comment

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

If this commit had a Fix #X or related to issue #X with a link back to the issue maybe, but I don't see that.

Please sign in to comment.