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

DTPPCPSDK-1511 CCO ShopperInsights #180

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

prashantjagasia
Copy link

We’ll need to send down sShopper insights information from session to smart-payment-buttons.

@prashantjagasia prashantjagasia requested a review from a team as a code owner December 27, 2023 04:33
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0678191) 81.83% compared to head (27b6b3c) 81.52%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/session.js 0.00% 2 Missing ⚠️
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     
Flag Coverage Δ
client 76.14% <0.00%> (-0.37%) ⬇️
server 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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
Copy link
Contributor

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 {
Copy link
Member

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 {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants