payment-kit 1.13.96 → 1.13.97
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.
- package/api/src/libs/product.ts +10 -1
- package/blocklet.yml +1 -1
- package/package.json +3 -3
package/api/src/libs/product.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
|
+
|
|
3
|
+
import { CheckoutSession, Price, Product, Subscription } from '../store/models';
|
|
2
4
|
|
|
3
5
|
export async function getMainProductName(subscriptionId: string): Promise<string> {
|
|
6
|
+
const subscription = await Subscription.findByPk(subscriptionId);
|
|
7
|
+
|
|
8
|
+
// @see: https://github.com/ArcBlock/did-spaces/issues/962#issuecomment-1880549421
|
|
9
|
+
if (subscription && !isEmpty(subscription.description)) {
|
|
10
|
+
return subscription.description!;
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
const checkoutSession = await CheckoutSession.findOne({
|
|
5
14
|
where: {
|
|
6
15
|
subscription_id: subscriptionId,
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.97",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@abtnode/types": "1.16.21",
|
|
111
111
|
"@arcblock/eslint-config": "^0.2.4",
|
|
112
112
|
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
113
|
-
"@did-pay/types": "1.13.
|
|
113
|
+
"@did-pay/types": "1.13.97",
|
|
114
114
|
"@types/cookie-parser": "^1.4.6",
|
|
115
115
|
"@types/cors": "^2.8.17",
|
|
116
116
|
"@types/dotenv-flow": "^3.3.3",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"parser": "typescript"
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "f9ca9bf2030d0a2552b71c66470cbaf3964df0f8"
|
|
153
153
|
}
|