payment-kit 1.22.15 → 1.22.17

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.
@@ -52,7 +52,7 @@ export default {
52
52
  const claims: { [key: string]: object } = {
53
53
  prepareTx: {
54
54
  type: 'TransferV3Tx',
55
- description: `Pay all past due invoices for subscription ${subscription?.description}`,
55
+ description: `Pay all past due invoices ${subscriptionId ? `for subscription ${subscription?.description}` : ''}`,
56
56
  partialTx: { from: userDid, pk: userPk, itx },
57
57
  requirement: { tokens },
58
58
  chainInfo: {
@@ -4,7 +4,7 @@ import Joi from 'joi';
4
4
  import pick from 'lodash/pick';
5
5
  import isEmail from 'validator/es/lib/isEmail';
6
6
 
7
- import { Op } from 'sequelize';
7
+ import { Op, type WhereOptions } from 'sequelize';
8
8
  import { BN } from '@ocap/util';
9
9
  import { getStakeSummaryByDid, getTokenSummaryByDid, getTokenByAddress } from '../integrations/arcblock/stake';
10
10
  import { createListParamSchema, getOrder, getWhereFromKvQuery, getWhereFromQuery, MetadataSchema } from '../libs/api';
@@ -224,12 +224,16 @@ router.get('/:id/overdue/invoices', authPortal, async (req, res) => {
224
224
  if (!doc) {
225
225
  return res.status(404).json({ error: 'Customer not found' });
226
226
  }
227
+ const where: WhereOptions<Invoice> = {
228
+ customer_id: doc.id,
229
+ status: ['uncollectible'],
230
+ amount_remaining: { [Op.gt]: '0' },
231
+ };
232
+ if (typeof req.livemode === 'boolean') {
233
+ where.livemode = !!req.livemode;
234
+ }
227
235
  const { rows: invoices, count } = await Invoice.findAndCountAll({
228
- where: {
229
- customer_id: doc.id,
230
- status: ['uncollectible'],
231
- amount_remaining: { [Op.gt]: '0' },
232
- },
236
+ where,
233
237
  include: [
234
238
  { model: PaymentCurrency, as: 'paymentCurrency' },
235
239
  { model: PaymentMethod, as: 'paymentMethod' },
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.22.15
17
+ version: 1.22.17
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.22.15",
3
+ "version": "1.22.17",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev --open",
6
6
  "lint": "tsc --noEmit && eslint src api/src --ext .mjs,.js,.jsx,.ts,.tsx",
@@ -44,35 +44,35 @@
44
44
  ]
45
45
  },
46
46
  "dependencies": {
47
- "@abtnode/cron": "^1.17.2",
48
- "@arcblock/did": "^1.27.6",
49
- "@arcblock/did-connect-react": "^3.2.6",
47
+ "@abtnode/cron": "^1.17.3-beta-20251119-102907-28b69b76",
48
+ "@arcblock/did": "^1.27.11",
49
+ "@arcblock/did-connect-react": "^3.2.7",
50
50
  "@arcblock/did-connect-storage-nedb": "^1.8.0",
51
- "@arcblock/did-util": "^1.27.6",
52
- "@arcblock/jwt": "^1.27.6",
53
- "@arcblock/react-hooks": "^3.2.6",
54
- "@arcblock/ux": "^3.2.6",
55
- "@arcblock/validator": "^1.27.6",
56
- "@blocklet/did-space-js": "^1.2.3",
57
- "@blocklet/error": "^0.3.2",
58
- "@blocklet/js-sdk": "^1.17.2",
59
- "@blocklet/logger": "^1.17.2",
60
- "@blocklet/payment-broker-client": "1.22.15",
61
- "@blocklet/payment-react": "1.22.15",
62
- "@blocklet/payment-vendor": "1.22.15",
63
- "@blocklet/sdk": "^1.17.2",
64
- "@blocklet/ui-react": "^3.2.6",
51
+ "@arcblock/did-util": "^1.27.11",
52
+ "@arcblock/jwt": "^1.27.11",
53
+ "@arcblock/react-hooks": "^3.2.7",
54
+ "@arcblock/ux": "^3.2.7",
55
+ "@arcblock/validator": "^1.27.11",
56
+ "@blocklet/did-space-js": "^1.2.4",
57
+ "@blocklet/error": "^0.3.3",
58
+ "@blocklet/js-sdk": "^1.17.3-beta-20251119-102907-28b69b76",
59
+ "@blocklet/logger": "^1.17.3-beta-20251119-102907-28b69b76",
60
+ "@blocklet/payment-broker-client": "1.22.17",
61
+ "@blocklet/payment-react": "1.22.17",
62
+ "@blocklet/payment-vendor": "1.22.17",
63
+ "@blocklet/sdk": "^1.17.3-beta-20251119-102907-28b69b76",
64
+ "@blocklet/ui-react": "^3.2.7",
65
65
  "@blocklet/uploader": "^0.3.11",
66
66
  "@blocklet/xss": "^0.3.9",
67
67
  "@mui/icons-material": "^7.1.2",
68
68
  "@mui/lab": "7.0.0-beta.14",
69
69
  "@mui/material": "^7.1.2",
70
70
  "@mui/system": "^7.1.1",
71
- "@ocap/asset": "^1.27.6",
72
- "@ocap/client": "^1.27.6",
73
- "@ocap/mcrypto": "^1.27.6",
74
- "@ocap/util": "^1.27.6",
75
- "@ocap/wallet": "^1.27.6",
71
+ "@ocap/asset": "^1.27.11",
72
+ "@ocap/client": "^1.27.11",
73
+ "@ocap/mcrypto": "^1.27.11",
74
+ "@ocap/util": "^1.27.11",
75
+ "@ocap/wallet": "^1.27.11",
76
76
  "@stripe/react-stripe-js": "^2.9.0",
77
77
  "@stripe/stripe-js": "^2.4.0",
78
78
  "ahooks": "^3.8.5",
@@ -127,9 +127,9 @@
127
127
  "web3": "^4.16.0"
128
128
  },
129
129
  "devDependencies": {
130
- "@abtnode/types": "^1.17.2",
130
+ "@abtnode/types": "^1.17.3-beta-20251119-102907-28b69b76",
131
131
  "@arcblock/eslint-config-ts": "^0.3.3",
132
- "@blocklet/payment-types": "1.22.15",
132
+ "@blocklet/payment-types": "1.22.17",
133
133
  "@types/cookie-parser": "^1.4.9",
134
134
  "@types/cors": "^2.8.19",
135
135
  "@types/debug": "^4.1.12",
@@ -160,7 +160,7 @@
160
160
  "vite": "^7.0.0",
161
161
  "vite-node": "^3.2.4",
162
162
  "vite-plugin-babel-import": "^2.0.5",
163
- "vite-plugin-blocklet": "^0.12.2",
163
+ "vite-plugin-blocklet": "^0.12.3",
164
164
  "vite-plugin-node-polyfills": "^0.23.0",
165
165
  "vite-plugin-svgr": "^4.3.0",
166
166
  "vite-tsconfig-paths": "^5.1.4",
@@ -176,5 +176,5 @@
176
176
  "parser": "typescript"
177
177
  }
178
178
  },
179
- "gitHead": "4d8543567eb8958c55a8cf06d9031f3f64c57e27"
179
+ "gitHead": "5de77cb79635cdd8616113c587379fb430530d44"
180
180
  }
@@ -592,7 +592,10 @@ export default function CustomerHome() {
592
592
  }}
593
593
  dialogProps={{
594
594
  open: showOverduePayment,
595
- onClose: () => setShowOverduePayment(false),
595
+ onClose: () => {
596
+ setShowOverduePayment(false);
597
+ runAsync();
598
+ },
596
599
  title: t('customer.pastDue.title'),
597
600
  }}
598
601
  />