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

Commit

Permalink
Merge pull request #13078 from NejcZdovc/hotfix/#12688-poll
Browse files Browse the repository at this point in the history
Adds promo check when opening payments tab
  • Loading branch information
bsclifton authored Feb 15, 2018
2 parents fbdf34d + d1a8e5d commit c017bbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/browser/api/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ const paymentPresent = (state, tabId, present) => {
delete ledgerPaymentsPresent[tabId]
}

if (Object.keys(ledgerPaymentsPresent).length > 0 && getSetting(settings.PAYMENTS_ENABLED)) {
if (getSetting(settings.PAYMENTS_ENABLED) && present) {
if (!balanceTimeoutId) {
module.exports.getBalance(state)
}

appActions.onPromotionGet()
getPublisherTimestamp(true)
} else if (balanceTimeoutId) {
clearTimeout(balanceTimeoutId)
Expand Down

0 comments on commit c017bbb

Please sign in to comment.