Socket
Socket
Sign inDemoInstall

@paypal/common-components

Package Overview
Dependencies
14
Maintainers
20
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.48 to 1.0.49-alpha-27c8fed.0

2

package.json
{
"name": "@paypal/common-components",
"version": "1.0.48",
"version": "1.0.49-alpha-27c8fed.0",
"description": "PayPal common components, for integrating checkout products.",

@@ -5,0 +5,0 @@ "main": "dist/ui.js",

@@ -118,5 +118,22 @@ /* @flow */

alias: "onContingencyResult",
decorate: ({ value, onError }) => {
decorate: ({ props, value, onError }) => {
return (err, result) => {
if (err || (result && !result.success)) {
const isCardFieldFlow = props?.userType === "UNBRANDED_GUEST";
// eslint-disable-next-line no-console
console.log("Seb userType", { userType: props?.userType });
// eslint-disable-next-line no-console
console.log("Seb cardFieldFlow", { isCardFieldFlow });
// HostedFields ONLY rejects when the err object is not null. The below implementation ensures that CardFields follows the same pattern.
const hasError = isCardFieldFlow
? err
: // $FlowFixMe[incompatible-use]
err || result?.success === false;
// eslint-disable-next-line no-console
console.log("Seb err", { err });
// eslint-disable-next-line no-console
console.log("Seb result", { result });
// eslint-disable-next-line no-console
console.log("Seb hasError", { hasError });
if (hasError) {
return onError(err);

@@ -123,0 +140,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc