Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paypal/checkout-components

Package Overview
Dependencies
Maintainers
20
Versions
504
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/checkout-components - npm Package Compare versions

Comparing version 5.0.323 to 5.0.324-alpha-2739cc0.0

2

package.json
{
"name": "@paypal/checkout-components",
"version": "5.0.323",
"version": "5.0.324-alpha-2739cc0.0",
"description": "PayPal Checkout components, for integrating checkout products.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,7 +17,2 @@ /* @flow */

import { BUTTON_LAYOUT, BUTTON_FLOW } from "../constants";
import type {
OnShippingChange,
OnShippingAddressChange,
OnShippingOptionsChange,
} from "../ui/buttons/props";

@@ -270,10 +265,6 @@ import { getFundingConfig } from "./config";

wallet,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
}: {|
wallet: ?Wallet,
onShippingChange: ?OnShippingChange,
onShippingAddressChange: ?OnShippingAddressChange,
onShippingOptionsChange: ?OnShippingOptionsChange,
hasShippingCallback: boolean,
|}): boolean {

@@ -284,3 +275,3 @@ if (!wallet) {

if (onShippingChange || onShippingAddressChange || onShippingOptionsChange) {
if (hasShippingCallback) {
return false;

@@ -287,0 +278,0 @@ }

@@ -7,3 +7,3 @@ /* @flow */

import { isFundingEligible } from "./funding";
import { isFundingEligible, isWalletFundingEligible } from "./funding";

@@ -142,1 +142,35 @@ const defaultMockFundingOptions = {

});
describe("isWalletFundingEligible", () => {
const mockWalletValue = { instruments: [] };
const mockWallet = {
paypal: mockWalletValue,
card: mockWalletValue,
credit: mockWalletValue,
venmo: mockWalletValue,
};
test("should not be eligible if a shipping callback is present", () => {
const result = isWalletFundingEligible({
wallet: mockWallet,
hasShippingCallback: true,
});
expect(result).toBe(false);
});
test("should not be eligible if wallet does not exist", () => {
const result = isWalletFundingEligible({
wallet: null,
hasShippingCallback: false,
});
expect(result).toBe(false);
});
test("should be eligible if a shipping callback is not present & wallet exists", () => {
const result = isWalletFundingEligible({
wallet: mockWallet,
hasShippingCallback: false,
});
expect(result).toBe(true);
});
});

@@ -26,9 +26,3 @@ /* @flow */

import {
normalizeButtonProps,
type ButtonPropsInputs,
type OnShippingChange,
type OnShippingAddressChange,
type OnShippingOptionsChange,
} from "./props";
import { normalizeButtonProps, type ButtonPropsInputs } from "./props";
import { Style } from "./style";

@@ -45,5 +39,3 @@ import { Button } from "./button";

fundingSource: $Values<typeof FUNDING>,
onShippingChange: ?OnShippingChange,
onShippingAddressChange: ?OnShippingAddressChange,
onShippingOptionsChange: ?OnShippingOptionsChange,
hasShippingCallback: boolean,
|};

@@ -54,5 +46,3 @@

fundingSource,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
}: GetWalletInstrumentOptions): ?WalletInstrument {

@@ -62,5 +52,3 @@ if (

wallet,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
})

@@ -88,5 +76,3 @@ ) {

fundingSources: $ReadOnlyArray<$Values<typeof FUNDING>>,
onShippingChange: ?OnShippingChange,
onShippingAddressChange: ?OnShippingAddressChange,
onShippingOptionsChange: ?OnShippingOptionsChange,
hasShippingCallback: boolean,
layout: $Values<typeof BUTTON_LAYOUT>,

@@ -99,5 +85,3 @@ |};

fundingSources,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
}: GetWalletInstrumentsOptions): {|

@@ -111,5 +95,3 @@ [$Values<typeof FUNDING>]: WalletInstrument,

fundingSource: source,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
});

@@ -244,5 +226,3 @@

layout,
onShippingChange,
onShippingAddressChange,
onShippingOptionsChange,
hasShippingCallback,
});

@@ -249,0 +229,0 @@

@@ -126,3 +126,5 @@ /* @flow */

required: false,
queryParam: false,
queryParam: ({ value }) =>
value?.searchParameter || "atomicsWaitingState",
queryValue: ({ value }) => value?.encodedState || "",
},

@@ -129,0 +131,0 @@ clientID: {

@@ -42,2 +42,6 @@ /* @flow */

|},
atomicsWaitingState: {|
searchParameter: string,
encodedState: string,
|},
|};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc