Commit 5eff7449 authored by Eriksson Monteiro's avatar Eriksson Monteiro

update ad module. change ad rotation time to 30s

parent d90277d1
...@@ -37,7 +37,7 @@ cr.define('millix_bar', function () { ...@@ -37,7 +37,7 @@ cr.define('millix_bar', function () {
let reloadTimeout = undefined; let reloadTimeout = undefined;
let fetchAdvertisementTimeout = undefined; let fetchAdvertisementTimeout = undefined;
let transactionTimestampUpdateTimeout = undefined; let transactionTimestampUpdateTimeout = undefined;
const ADVERTISEMENT_ROTATION_TIME = 60000; const ADVERTISEMENT_ROTATION_TIME = 30000;
const ADVERTISEMENT_ROTATION_TIME_EMPTY = 5000; const ADVERTISEMENT_ROTATION_TIME_EMPTY = 5000;
let walletLocked = true; let walletLocked = true;
let unlockFromBar = false; let unlockFromBar = false;
...@@ -122,12 +122,12 @@ cr.define('millix_bar', function () { ...@@ -122,12 +122,12 @@ cr.define('millix_bar', function () {
const aDayAgo = Date.now() - 86400000; const aDayAgo = Date.now() - 86400000;
if (thirtyMinutesAgo > sessionStart && (!!advertisementPaymentTimestampLast && aDayAgo > advertisementPaymentTimestampLast)) { if (thirtyMinutesAgo > sessionStart && (!!advertisementPaymentTimestampLast && aDayAgo > advertisementPaymentTimestampLast)) {
$headline.text('unable to find ads'); $headline.text('unable to find ads');
$targetPhrase.text(`please click "help -> report issue" to resolve`); $targetPhrase.text('please click "help -> report issue" to resolve');
} else { } else {
$headline.text('searching for ad...'); $headline.text('searching for ads...');
if (aMinuteAgo > sessionStart && (!!advertisementPaymentTimestampLast && twoMinutesAgo > advertisementPaymentTimestampLast)) { if (aMinuteAgo > sessionStart && (!!advertisementPaymentTimestampLast && twoMinutesAgo > advertisementPaymentTimestampLast)) {
$targetPhrase.text(`it has been ${moment(new Date(advertisementPaymentTimestampLast)).fromNow()} since your last ad payment`); $targetPhrase.text(`your last ad payment was received ${moment(new Date(advertisementPaymentTimestampLast)).fromNow()}`);
} else { } else {
$targetPhrase.text(''); $targetPhrase.text('');
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment