@bithomp/xrpl-api 3.1.5 → 3.1.6

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.
@@ -76,6 +76,13 @@ async function getTransactions(account, options = { limit: DEFAULT_LIMIT }) {
76
76
  };
77
77
  }
78
78
  const result = response?.result;
79
+ if (!result) {
80
+ return {
81
+ account,
82
+ status: "error",
83
+ error: "invalidResponse",
84
+ };
85
+ }
79
86
  if (Array.isArray(result.transactions)) {
80
87
  if (options.balanceChanges === true || options.specification === true) {
81
88
  for (const transaction of result.transactions) {
@@ -152,7 +159,7 @@ async function findTransactions(account, options = { limit: DEFAULT_LIMIT, timeo
152
159
  break;
153
160
  }
154
161
  }
155
- if (accountTransactionsError) {
162
+ if (accountTransactionsError && transactions.length === 0) {
156
163
  return accountTransactionsError;
157
164
  }
158
165
  if (options.marker && transactions.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -65,11 +65,11 @@
65
65
  "@types/chai": "^4.3.19",
66
66
  "@types/chai-as-promised": "^7.1.8",
67
67
  "@types/lodash": "^4.17.7",
68
- "@types/mocha": "^10.0.7",
68
+ "@types/mocha": "^10.0.8",
69
69
  "@types/nconf": "^0.10.7",
70
70
  "@types/node": "^20.14.15",
71
- "@typescript-eslint/eslint-plugin": "^8.4.0",
72
- "@typescript-eslint/parser": "^8.4.0",
71
+ "@typescript-eslint/eslint-plugin": "^8.6.0",
72
+ "@typescript-eslint/parser": "^8.6.0",
73
73
  "chai": "^4.5.0",
74
74
  "chai-as-promised": "^7.1.2",
75
75
  "eslint": "^8.57.0",