@blocklet/payment-react 1.13.285 → 1.13.287
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.
|
@@ -21,7 +21,7 @@ import { styled } from "@mui/system";
|
|
|
21
21
|
import { useSetState } from "ahooks";
|
|
22
22
|
import { useEffect, useMemo, useState } from "react";
|
|
23
23
|
import { usePaymentContext } from "../contexts/payment.js";
|
|
24
|
-
import { formatError, formatPriceAmount, formatRecurring } from "../libs/util.js";
|
|
24
|
+
import { formatError, formatPriceAmount, formatRecurring, getPriceCurrencyOptions } from "../libs/util.js";
|
|
25
25
|
import Amount from "../payment/amount.js";
|
|
26
26
|
const groupItemsByRecurring = (items) => {
|
|
27
27
|
const grouped = {};
|
|
@@ -70,7 +70,7 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
|
|
|
70
70
|
return [];
|
|
71
71
|
}
|
|
72
72
|
grouped[state.interval].forEach((x) => {
|
|
73
|
-
x.price.
|
|
73
|
+
getPriceCurrencyOptions(x.price).forEach((c) => {
|
|
74
74
|
visited[c?.currency_id] = true;
|
|
75
75
|
});
|
|
76
76
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.287",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@arcblock/did-connect": "^2.10.
|
|
56
|
-
"@arcblock/ux": "^2.10.
|
|
57
|
-
"@arcblock/ws": "^1.18.
|
|
55
|
+
"@arcblock/did-connect": "^2.10.3",
|
|
56
|
+
"@arcblock/ux": "^2.10.3",
|
|
57
|
+
"@arcblock/ws": "^1.18.124",
|
|
58
58
|
"@mui/icons-material": "^5.15.19",
|
|
59
59
|
"@mui/lab": "^5.0.0-alpha.170",
|
|
60
60
|
"@mui/material": "^5.15.19",
|
|
61
61
|
"@mui/styles": "^5.15.19",
|
|
62
62
|
"@mui/system": "^5.15.15",
|
|
63
|
-
"@ocap/util": "^1.18.
|
|
63
|
+
"@ocap/util": "^1.18.124",
|
|
64
64
|
"@stripe/react-stripe-js": "^2.7.1",
|
|
65
65
|
"@stripe/stripe-js": "^2.4.0",
|
|
66
66
|
"@vitejs/plugin-legacy": "^5.4.1",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@babel/core": "^7.24.7",
|
|
92
92
|
"@babel/preset-env": "^7.24.7",
|
|
93
93
|
"@babel/preset-react": "^7.24.7",
|
|
94
|
-
"@blocklet/payment-types": "1.13.
|
|
94
|
+
"@blocklet/payment-types": "1.13.287",
|
|
95
95
|
"@storybook/addon-essentials": "^7.6.19",
|
|
96
96
|
"@storybook/addon-interactions": "^7.6.19",
|
|
97
97
|
"@storybook/addon-links": "^7.6.19",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"vite-plugin-babel": "^1.2.0",
|
|
121
121
|
"vite-plugin-node-polyfills": "^0.21.0"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "a0dac51aff70028e5996af607181e285ea2bb770"
|
|
124
124
|
}
|
|
@@ -23,7 +23,7 @@ import { useSetState } from 'ahooks';
|
|
|
23
23
|
import { useEffect, useMemo, useState } from 'react';
|
|
24
24
|
|
|
25
25
|
import { usePaymentContext } from '../contexts/payment';
|
|
26
|
-
import { formatError, formatPriceAmount, formatRecurring } from '../libs/util';
|
|
26
|
+
import { formatError, formatPriceAmount, formatRecurring, getPriceCurrencyOptions } from '../libs/util';
|
|
27
27
|
import Amount from '../payment/amount';
|
|
28
28
|
|
|
29
29
|
const groupItemsByRecurring = (items: TPricingTableItem[]) => {
|
|
@@ -89,7 +89,7 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
|
|
|
89
89
|
return [];
|
|
90
90
|
}
|
|
91
91
|
grouped[state.interval].forEach((x: TPricingTableItem) => {
|
|
92
|
-
x.price.
|
|
92
|
+
getPriceCurrencyOptions(x.price).forEach((c: PriceCurrency) => {
|
|
93
93
|
visited[c?.currency_id] = true;
|
|
94
94
|
});
|
|
95
95
|
});
|