@bithomp/xrpl-api 3.2.25 → 3.2.27

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.
@@ -12,7 +12,7 @@ function parseMemos(tx) {
12
12
  return (0, common_1.removeUndefined)({
13
13
  type: (0, utils_1.hexToString)(m.Memo.MemoType),
14
14
  format: (0, utils_1.hexToString)(m.Memo.MemoFormat),
15
- data: (0, utils_1.hexToString)(m.Memo.MemoData),
15
+ data: decodeData(m.Memo.MemoData),
16
16
  });
17
17
  });
18
18
  }
@@ -25,3 +25,13 @@ function formattedMemoToMemo(memo) {
25
25
  }),
26
26
  };
27
27
  }
28
+ function decodeData(data) {
29
+ if (!data) {
30
+ return undefined;
31
+ }
32
+ const decoded = (0, utils_1.hexToString)(data);
33
+ if (decoded && decoded.includes("�")) {
34
+ return data;
35
+ }
36
+ return decoded;
37
+ }
@@ -35,11 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  const assert = __importStar(require("assert"));
37
37
  const common_1 = require("../../common");
38
+ const source_1 = require("../ledger/source");
38
39
  const emit_details_1 = require("../ledger/emit_details");
39
40
  const memos_1 = require("../ledger/memos");
40
41
  function parseAmendment(tx) {
41
42
  assert.ok(tx.TransactionType === "EnableAmendment");
42
43
  return (0, common_1.removeUndefined)({
44
+ source: (0, source_1.parseSource)(tx),
43
45
  amendment: tx.Amendment,
44
46
  emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
45
47
  memos: (0, memos_1.parseMemos)(tx),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.2.25",
3
+ "version": "3.2.27",
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",
@@ -64,25 +64,25 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@eslint/eslintrc": "^3.3.1",
67
- "@types/chai": "^5.2.1",
67
+ "@types/chai": "^5.2.2",
68
68
  "@types/chai-as-promised": "^8.0.2",
69
- "@types/lodash": "^4.17.16",
69
+ "@types/lodash": "^4.17.17",
70
70
  "@types/mocha": "^10.0.10",
71
71
  "@types/nconf": "^0.10.7",
72
- "@types/node": "^22.15.3",
73
- "@typescript-eslint/eslint-plugin": "^8.31.1",
74
- "@typescript-eslint/parser": "^8.31.1",
72
+ "@types/node": "^22.15.21",
73
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
74
+ "@typescript-eslint/parser": "^8.32.1",
75
75
  "chai": "^4.5.0",
76
76
  "chai-as-promised": "^7.1.2",
77
- "eslint": "^9.26.0",
78
- "eslint-config-prettier": "^10.1.2",
77
+ "eslint": "^9.27.0",
78
+ "eslint-config-prettier": "^10.1.5",
79
79
  "eslint-plugin-chai-friendly": "^1.0.1",
80
80
  "eslint-plugin-import": "^2.31.0",
81
- "eslint-plugin-n": "^17.17.0",
81
+ "eslint-plugin-n": "^17.18.0",
82
82
  "eslint-plugin-promise": "^7.2.1",
83
- "mocha": "^11.2.2",
83
+ "mocha": "^11.4.0",
84
84
  "nconf": "^0.13.0",
85
- "ts-jest": "^29.3.2",
85
+ "ts-jest": "^29.3.4",
86
86
  "ts-node": "^10.9.2",
87
87
  "typescript": "^5.8.3"
88
88
  }