@blocklet/launcher-workflow 1.8.36 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/purchase.js +4 -4
  2. package/package.json +18 -18
package/lib/purchase.js CHANGED
@@ -87,7 +87,7 @@ function PurchasePage(_ref) {
87
87
  const userDid = query.get('userDid') || (0, _lodash.default)(session, 'user.did');
88
88
  const isEmbed = !!query.get('blocklet_meta_url');
89
89
  (0, _react.useEffect)(() => {
90
- if (!session.loading && paymentMethod && paymentMethod === _constant.CURRENCY_TYPE.fiat && !userDid) {
90
+ if (!session.loading && paymentMethod && paymentMethod.type !== 'fiat' && !userDid) {
91
91
  session.login();
92
92
  } // eslint-disable-next-line
93
93
 
@@ -182,7 +182,7 @@ function PurchasePage(_ref) {
182
182
  className: "page-body-article",
183
183
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_submit.default, {
184
184
  disabled: paying,
185
- onConfirm: () => handlePay(paymentMethod.type),
185
+ onConfirm: () => handlePay(paymentMethod),
186
186
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_compactLayout.default, {
187
187
  onBottomFix: type => setButtonInFix(type === 'fix'),
188
188
  bottom: planLoaded ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -196,7 +196,7 @@ function PurchasePage(_ref) {
196
196
  },
197
197
  children: t('common.redeem')
198
198
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
199
- onClick: () => handlePay(paymentMethod.type),
199
+ onClick: () => handlePay(paymentMethod),
200
200
  disabled: paying,
201
201
  variant: "contained",
202
202
  color: "primary",
@@ -229,7 +229,7 @@ function PurchasePage(_ref) {
229
229
  })
230
230
  }), paying && /*#__PURE__*/(0, _jsxRuntime.jsx)(_payment.default, {
231
231
  baseURL: (0, _urlJoin.default)(window.location.origin, baseURL),
232
- method: paymentMethod.type,
232
+ method: paymentMethod,
233
233
  userDid: session === null || session === void 0 ? void 0 : (_session$user = session.user) === null || _session$user === void 0 ? void 0 : _session$user.did,
234
234
  productId: plan._id,
235
235
  onComplete: handlePaid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "1.8.36",
3
+ "version": "1.9.0",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,22 +36,22 @@
36
36
  "react": ">=18.1.0"
37
37
  },
38
38
  "dependencies": {
39
- "@arcblock/did-connect": "^2.4.29",
40
- "@arcblock/icons": "^2.4.29",
41
- "@arcblock/license": "^2.4.29",
42
- "@arcblock/ux": "^2.4.29",
43
- "@blocklet/launcher-layout": "1.8.36",
44
- "@blocklet/launcher-util": "1.8.36",
45
- "@blocklet/launcher-ux": "1.8.36",
46
- "@did-pay/react": "^1.8.32",
39
+ "@arcblock/did-connect": "^2.4.32",
40
+ "@arcblock/icons": "^2.4.32",
41
+ "@arcblock/license": "^2.4.32",
42
+ "@arcblock/ux": "^2.4.32",
43
+ "@blocklet/launcher-layout": "1.9.0",
44
+ "@blocklet/launcher-util": "1.9.0",
45
+ "@blocklet/launcher-ux": "1.9.0",
46
+ "@did-pay/react": "^1.9.0",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
49
49
  "@mui/icons-material": "^5.10.6",
50
- "@mui/lab": "^5.0.0-alpha.100",
51
- "@mui/material": "^5.10.6",
50
+ "@mui/lab": "^5.0.0-alpha.101",
51
+ "@mui/material": "^5.10.7",
52
52
  "@ocap/util": "^1.17.19",
53
- "@stripe/react-stripe-js": "^1.10.0",
54
- "@stripe/stripe-js": "^1.36.0",
53
+ "@stripe/react-stripe-js": "^1.12.0",
54
+ "@stripe/stripe-js": "^1.38.1",
55
55
  "axios": "^0.26.1",
56
56
  "flat": "^5.0.2",
57
57
  "js-cookie": "^3.0.1",
@@ -59,16 +59,16 @@
59
59
  "lodash.throttle": "^4.1.1",
60
60
  "prop-types": "^15.8.1",
61
61
  "react-lottie-player": "^1.4.3",
62
- "react-router-dom": "^6.4.0",
62
+ "react-router-dom": "^6.4.1",
63
63
  "react-use": "^17.4.0",
64
64
  "url-join": "^4.0.1"
65
65
  },
66
66
  "devDependencies": {
67
- "@babel/cli": "^7.18.10",
68
- "@babel/core": "^7.19.1",
69
- "@babel/preset-env": "^7.19.1",
67
+ "@babel/cli": "^7.19.3",
68
+ "@babel/core": "^7.19.3",
69
+ "@babel/preset-env": "^7.19.3",
70
70
  "@babel/preset-react": "^7.18.6",
71
71
  "babel-plugin-inline-react-svg": "^2.0.1"
72
72
  },
73
- "gitHead": "b666765447ca8543bee2e65f4ce2a948de15136c"
73
+ "gitHead": "530c89f3902977736ff0bdccb7a6c9ee2d9b1d02"
74
74
  }