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

@usewinter/checkout

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@usewinter/checkout - npm Package Compare versions

Comparing version 0.1.41 to 0.1.42

1

dist/components/WinterCheckout.d.ts

@@ -25,2 +25,3 @@ import React = require("react");

giftingNFT?: boolean;
fa2Address?: string;
onClose?: () => void;

@@ -27,0 +28,0 @@ onSuccess?: (txId: string, email: string) => void;

@@ -7,7 +7,13 @@ "use strict";

exports.default = void 0;
require("core-js/modules/web.dom-collections.iterator.js");
require("core-js/modules/es.json.stringify.js");
var _react = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const WinterCheckout = _ref => {

@@ -40,2 +46,3 @@ let {

giftingNFT,
fa2Address,
policyId,

@@ -51,2 +58,3 @@ recaptcha

} = e;
if (data === "closeWinterCheckoutModal") {

@@ -67,2 +75,3 @@ onClose === null || onClose === void 0 ? void 0 : onClose();

};
window.addEventListener("message", handleWindowEvent);

@@ -74,2 +83,3 @@ return () => window.removeEventListener("message", handleWindowEvent);

let queryString = "";
if (projectId) {

@@ -85,2 +95,3 @@ queryString += "projectId=" + projectId;

}
if (recaptcha) {

@@ -90,51 +101,73 @@ // Used for jpg primary mints

}
if (walletAddress) {
queryString += "&walletAddress=" + walletAddress;
}
if (email) {
queryString += "&email=" + email;
}
if (mintQuantity) {
queryString += "&mintQuantity=" + mintQuantity;
}
if (fillSource) {
queryString += "&fillSource=" + fillSource;
}
if (orderSource) {
queryString += "&orderSource=" + orderSource;
}
if (erc1155Video) {
queryString += "&erc1155Video=" + erc1155Video;
}
if (title) {
queryString += "&title=" + title;
}
if (language) {
queryString += "&language=" + language;
}
if (brandImage) {
queryString += "&brandImage=".concat(brandImage);
}
if (gentkId) {
queryString += "&gentkId=".concat(gentkId);
}
if (paymentMethod) {
queryString += "&paymentMethod=".concat(paymentMethod);
}
if (giftingAvailable) {
queryString += "&giftingAvailable=".concat(giftingAvailable);
}
if (giftingNFT) {
queryString += "&giftingNFT=".concat(giftingNFT);
}
if (fa2Address) {
queryString += "&fa2Address=".concat(fa2Address);
}
if (extraMintParams) {
queryString += "&extraMintParams=".concat(encodeURIComponent(JSON.stringify(extraMintParams)));
}
if (priceFunctionParams) {
queryString += "&priceFunctionParams=".concat(encodeURIComponent(JSON.stringify(priceFunctionParams)));
}
if (appearance) {
queryString += "&appearance=".concat(encodeURIComponent(JSON.stringify(appearance)));
}
var url;
if (production) {

@@ -149,9 +182,9 @@ url = "https://checkout.usewinter.com/?" + queryString;

}
setProjectUrl(url);
// Open checkout in new window if payment method is SOL
setProjectUrl(url); // Open checkout in new window if payment method is SOL
if (paymentMethod === "SOL" && showModal) {
window.open(url, "checkout", "height=" + window.innerHeight + ",width=800");
}
}, [onSuccess, onClose, projectId, showModal, walletAddress, email, mintQuantity, erc1155Video, title, brandImage, extraMintParams, priceFunctionParams, production, language, appearance, gentkId, assetId, giftingAvailable, giftingNFT]);
}, [onSuccess, onClose, projectId, showModal, walletAddress, email, mintQuantity, erc1155Video, title, brandImage, extraMintParams, priceFunctionParams, production, language, appearance, gentkId, assetId, giftingAvailable, giftingNFT, fa2Address]);
return showModal && paymentMethod !== "SOL" ? /*#__PURE__*/_react.default.createElement("div", {

@@ -163,3 +196,4 @@ dangerouslySetInnerHTML: {

};
var _default = WinterCheckout;
exports.default = _default;

@@ -12,3 +12,5 @@ "use strict";

});
var _WinterCheckout = _interopRequireDefault(require("./components/WinterCheckout"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

2

package.json
{
"name": "@usewinter/checkout",
"version": "0.1.41",
"version": "0.1.42",
"description": "Integrate Winter's NFT checkout with this React component",

@@ -5,0 +5,0 @@ "author": "Evan Fisher",

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