From 23a7efe733b56da8ab5b12693786346d1850ff93 Mon Sep 17 00:00:00 2001 From: Ian Krieger <48930920+IanKrieger@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:58:49 -0400 Subject: [PATCH] fix: update perDay & totalMax defaults (#893) * fix: update perDay & totalMax defaults * fix: tests --- src/user/library/index.test.ts | 4 ++-- src/user/library/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user/library/index.test.ts b/src/user/library/index.test.ts index 3aca2f99..4c468ba4 100644 --- a/src/user/library/index.test.ts +++ b/src/user/library/index.test.ts @@ -283,14 +283,14 @@ describe("new form tests", () => { "name": "macos", }, ], - "perDay": 1, + "perDay": 4, "segments": [ { "code": "5678", "name": "test", }, ], - "totalMax": 10, + "totalMax": 28, }, ], "advertiserId": "12345", diff --git a/src/user/library/index.ts b/src/user/library/index.ts index 3d13df89..4543e1de 100644 --- a/src/user/library/index.ts +++ b/src/user/library/index.ts @@ -53,10 +53,10 @@ export function transformNewForm( adSets: form.adSets.map((adSet) => ({ name: adSet.name, billingType: form.billingType, - perDay: 1, + perDay: form.format === CampaignFormat.PushNotification ? 4 : 6, segments: adSet.segments.map((s) => ({ code: s.code, name: s.name })), oses: adSet.oses, - totalMax: 10, + totalMax: form.format === CampaignFormat.PushNotification ? 28 : 60, conversions: transformConversion(adSet.conversions), ads: adSet.creatives .filter((c) => c.included)