Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid 9.0: no harvest eids #11588

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions modules/hadronRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SUBMODULE_NAME = 'hadron';
const AU_GVLID = 561;
const HADRON_ID_DEFAULT_URL = 'https://id.hadron.ad.gt/api/v1/hadronid?_it=prebid';
const HADRON_SEGMENT_URL = 'https://id.hadron.ad.gt/api/v1/rtd';
export const HALOID_LOCAL_NAME = 'auHadronId';
export const HADRONID_LOCAL_NAME = 'auHadronId';
export const RTD_LOCAL_NAME = 'auHadronRtd';
export const storage = getStorageManager({moduleType: MODULE_TYPE_RTD, moduleName: SUBMODULE_NAME});

Expand Down Expand Up @@ -132,7 +132,6 @@ export function addRealTimeData(bidConfig, rtd, rtdConfig) {
if (rtdConfig.params && rtdConfig.params.handleRtd) {
rtdConfig.params.handleRtd(bidConfig, rtd, rtdConfig, config);
} else {
// TODO: this and haloRtdProvider are a copy-paste of each other
if (isPlainObject(rtd.ortb2)) {
mergeLazy(bidConfig.ortb2Fragments?.global, rtd.ortb2);
}
Expand Down Expand Up @@ -165,9 +164,9 @@ export function getRealTimeData(bidConfig, onDone, rtdConfig, userConsent) {
}
}

const userIds = typeof getGlobal().getUserIds === 'function' ? (getGlobal()).getUserIds() : {};
const userIds = {};

let hadronId = storage.getDataFromLocalStorage(HALOID_LOCAL_NAME);
let hadronId = storage.getDataFromLocalStorage(HADRONID_LOCAL_NAME);
if (isStr(hadronId)) {
if (typeof getGlobal().refreshUserIds === 'function') {
(getGlobal()).refreshUserIds({submoduleNames: 'hadronId'});
Expand Down
6 changes: 2 additions & 4 deletions test/spec/modules/hadronRtdProvider_spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// TODO: this and hadronRtdProvider_spec are a copy-paste of each other

import {config} from 'src/config.js';
import {HALOID_LOCAL_NAME, RTD_LOCAL_NAME, addRealTimeData, getRealTimeData, hadronSubmodule, storage} from 'modules/hadronRtdProvider.js';
import {HADRONID_LOCAL_NAME, RTD_LOCAL_NAME, addRealTimeData, getRealTimeData, hadronSubmodule, storage} from 'modules/hadronRtdProvider.js';
import {server} from 'test/mocks/xhr.js';

const responseHeader = {'Content-Type': 'application/json'};
Expand Down Expand Up @@ -737,7 +735,7 @@ describe('hadronRtdProvider', function() {
}
};

getDataFromLocalStorageStub.withArgs(HALOID_LOCAL_NAME).returns('testHadronId1');
getDataFromLocalStorageStub.withArgs(HADRONID_LOCAL_NAME).returns('testHadronId1');
getRealTimeData(bidConfig, () => {}, rtdConfig, {});

let request = server.requests[0];
Expand Down