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

Commit

Permalink
Adds promo check when opening payments tab
Browse files Browse the repository at this point in the history
Resolves #12688

Auditors:

Test Plan:
  • Loading branch information
NejcZdovc authored and bsclifton committed Feb 15, 2018
1 parent fbdf34d commit d1a8e5d
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 d1a8e5d

Please sign in to comment.