@xuda.io/account_module 1.2.94 → 1.2.95

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/index.js +2 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1454,11 +1454,12 @@ exports.validate_account_topup = async function (uid, items = []) {
1454
1454
  throw new Error("no card on file");
1455
1455
  }
1456
1456
 
1457
- if (data?.open_invoices?.length) {
1457
+ if (data?.balance?.past_due) {
1458
1458
  let err = new Error(`past_due ${data?.balance?.past_due}`);
1459
1459
  err.code = -91;
1460
1460
  err.billing_problem = true;
1461
1461
  err.topup = topup;
1462
+ err.open_invoices = data?.open_invoices?;
1462
1463
  throw err;
1463
1464
  }
1464
1465
  // if (data?.balance?.past_due) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.94",
3
+ "version": "1.2.95",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {