payment-kit 1.14.31 → 1.14.32

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.
@@ -73,7 +73,7 @@ export default function createQueue<T = any>({ name, onJob, options = defaults }
73
73
  // @ts-ignore
74
74
  }, concurrency);
75
75
 
76
- const push = ({ job, id, persist, delay, runAt }: PushParams<T>) => {
76
+ const push = ({ job, id, persist = true, delay, runAt }: PushParams<T>) => {
77
77
  const jobEvents = new EventEmitter();
78
78
  const emit = (e: string, data: any) => {
79
79
  queueEvents.emit(e, data);
@@ -136,6 +136,7 @@ export default function createQueue<T = any>({ name, onJob, options = defaults }
136
136
  clearJob(jobId);
137
137
  return;
138
138
  }
139
+ logger.error('job errored', { queue: name, id: jobId, job, result, error: err });
139
140
 
140
141
  try {
141
142
  const doc = await store.getJob(jobId);
@@ -652,6 +652,7 @@ const slashStakeOnCancel = async (subscription: Subscription) => {
652
652
  });
653
653
  logger.info('Invoice created for stake slash', { invoice: invoice.id, subscription: subscription.id });
654
654
  paymentIntent.update({ invoice_id: invoice.id });
655
+ logger.info('Payment intent updated with invoice', { invoice: invoice.id, paymentIntent: paymentIntent.id });
655
656
  };
656
657
 
657
658
  // generate invoice for subscription periodically
@@ -845,7 +846,10 @@ events.on('customer.subscription.deleted', (subscription: Subscription) => {
845
846
  // FIXME: ensure invoices that are open or uncollectible are voided
846
847
 
847
848
  if (subscription.cancelation_details?.slash_stake) {
848
- slashStakeQueue.push({ id: `slash-stake-${subscription.id}`, job: { subscriptionId: subscription.id } });
849
+ slashStakeQueue.push({
850
+ id: `slash-stake-${subscription.id}`,
851
+ job: { subscriptionId: subscription.id },
852
+ });
849
853
  } else if (subscription.cancelation_details?.return_stake) {
850
854
  returnStakeQueue.push({ id: `return-stake-${subscription.id}`, job: { subscriptionId: subscription.id } });
851
855
  }
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.14.31
17
+ version: 1.14.32
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.14.31",
3
+ "version": "1.14.32",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev --open",
6
6
  "eject": "vite eject",
@@ -52,7 +52,7 @@
52
52
  "@arcblock/validator": "^1.18.132",
53
53
  "@blocklet/js-sdk": "1.16.28",
54
54
  "@blocklet/logger": "1.16.28",
55
- "@blocklet/payment-react": "1.14.31",
55
+ "@blocklet/payment-react": "1.14.32",
56
56
  "@blocklet/sdk": "1.16.28",
57
57
  "@blocklet/ui-react": "^2.10.23",
58
58
  "@blocklet/uploader": "^0.1.23",
@@ -119,7 +119,7 @@
119
119
  "devDependencies": {
120
120
  "@abtnode/types": "1.16.28",
121
121
  "@arcblock/eslint-config-ts": "^0.3.2",
122
- "@blocklet/payment-types": "1.14.31",
122
+ "@blocklet/payment-types": "1.14.32",
123
123
  "@types/cookie-parser": "^1.4.7",
124
124
  "@types/cors": "^2.8.17",
125
125
  "@types/debug": "^4.1.12",
@@ -161,5 +161,5 @@
161
161
  "parser": "typescript"
162
162
  }
163
163
  },
164
- "gitHead": "bd36f69fcd955be6b1353b520879bbb3c1e3266f"
164
+ "gitHead": "347accd83eb9354f423e06670d53003b4fd40114"
165
165
  }