Skip to content

Commit

Permalink
use compactHeight and standardHeight in customData (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-lei committed May 30, 2024
1 parent a3dbd42 commit a5675b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/flippBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const DEFAULT_CREATIVE_TYPE = 'NativeX';
const VALID_CREATIVE_TYPES = ['DTX', 'NativeX'];
const FLIPP_USER_KEY = 'flipp-uid';
const COMPACT_DEFAULT_HEIGHT = 600;
const STANDARD_DEFAULT_HEIGHT = 1800;

let userKey = null;
export const storage = getStorageManager({bidderCode: BIDDER_CODE});
Expand Down Expand Up @@ -166,7 +167,10 @@ export const spec = {
if (!isEmpty(res) && !isEmpty(res.decisions) && !isEmpty(res.decisions.inline)) {
return res.decisions.inline.map(decision => {
const placement = placements.find(p => p.prebid.requestId === decision.prebid?.requestId);
const height = placement.options?.startCompact ? COMPACT_DEFAULT_HEIGHT : decision.height;
const customData = decision.contents[0]?.data?.customData;
const height = placement.options?.startCompact
? customData?.compactHeight ?? COMPACT_DEFAULT_HEIGHT
: customData?.standardHeight ?? STANDARD_DEFAULT_HEIGHT;
return {
bidderCode: BIDDER_CODE,
requestId: decision.prebid?.requestId,
Expand Down

0 comments on commit a5675b4

Please sign in to comment.