-
Notifications
You must be signed in to change notification settings - Fork 68
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
DTPPCPSDK-1511 CCO ShopperInsights #180
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
- Coverage 81.83% 81.52% -0.31%
==========================================
Files 21 21
Lines 534 536 +2
Branches 40 40
==========================================
Hits 437 437
- Misses 97 99 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/script.js
Outdated
@@ -34,6 +34,7 @@ import { | |||
PAGE_TYPES, | |||
} from "@paypal/sdk-constants/src"; | |||
|
|||
import { getSessionState } from "./session"; // eslint-disable-line import/no-cycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move this logic to an another module or we can even introduce a new module to avoid the cyclic dependency between script and session.
src/script.js
Outdated
@@ -368,3 +369,9 @@ export function getCountry(): $Values<typeof COUNTRY> { | |||
export function getLang(): $Values<typeof LANG> { | |||
return getLocale().lang; | |||
} | |||
|
|||
export function getShopperInsights(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is pulling from session state, we should move it to src/session.js
src/script.js
Outdated
@@ -368,3 +369,9 @@ export function getCountry(): $Values<typeof COUNTRY> { | |||
export function getLang(): $Values<typeof LANG> { | |||
return getLocale().lang; | |||
} | |||
|
|||
export function getShopperInsights(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should name this getShopperInsightsUsed
or getRecommendedPaymentMethodsUsed
We’ll need to send down sShopper insights information from session to smart-payment-buttons.