@pioneer-platform/ripple-network 8.1.56 → 8.1.57

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/lib/index.js +12 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -231,27 +231,34 @@ var broadcast_transaction = function (tx) {
231
231
  };
232
232
  var get_account_info = function (address) {
233
233
  return __awaiter(this, void 0, void 0, function () {
234
- var tag, response, e_2;
234
+ var tag, response, ledgerIndexCurrent, output, e_2;
235
235
  return __generator(this, function (_a) {
236
236
  switch (_a.label) {
237
237
  case 0:
238
238
  tag = TAG + " | get_account_info | ";
239
239
  _a.label = 1;
240
240
  case 1:
241
- _a.trys.push([1, 3, , 4]);
241
+ _a.trys.push([1, 4, , 5]);
242
242
  return [4 /*yield*/, client.request({
243
243
  "command": "account_info",
244
244
  "account": address,
245
245
  "ledger_index": "validated"
246
- })];
246
+ })
247
+ //get recent ledger as well
248
+ ];
247
249
  case 2:
248
250
  response = _a.sent();
249
- return [2 /*return*/, response.result.account_data];
251
+ return [4 /*yield*/, client.getLedgerIndex()];
250
252
  case 3:
253
+ ledgerIndexCurrent = _a.sent();
254
+ output = response.result.account_data;
255
+ output.ledger_index_current = ledgerIndexCurrent;
256
+ return [2 /*return*/, output];
257
+ case 4:
251
258
  e_2 = _a.sent();
252
259
  log.error(tag, "e: ", e_2);
253
260
  throw e_2;
254
- case 4: return [2 /*return*/];
261
+ case 5: return [2 /*return*/];
255
262
  }
256
263
  });
257
264
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/ripple-network",
3
- "version": "8.1.56",
3
+ "version": "8.1.57",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {