evernode-js-client 0.5.11 → 0.5.13

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  ],
7
7
  "homepage": "https://github.com/HotPocketDev/evernode-js-client",
8
8
  "license": "MIT",
9
- "version": "0.5.11",
9
+ "version": "0.5.13",
10
10
  "scripts": {
11
11
  "lint": "./node_modules/.bin/eslint src/**/*.js",
12
12
  "build": "npm run lint && ncc build src/index.js -e elliptic -e xrpl -e ripple-address-codec -e ripple-keypairs -o dist/",
@@ -509,8 +509,7 @@ class BaseEvernodeClient {
509
509
  async getHosts(filters = null, pageSize = null, nextPageToken = null) {
510
510
  const hosts = await this.#firestoreHandler.getHosts(filters, pageSize, nextPageToken);
511
511
  const curMomentStartIdx = await this.getMomentStartIndex();
512
-
513
- return await Promise.all((hosts.nextPageToken ? hosts.data : hosts).map(async host => {
512
+ const res = await Promise.all((hosts.nextPageToken ? hosts.data : hosts).map(async host => {
514
513
  const hostAcc = new XrplAccount(host.address);
515
514
  host.domain = await hostAcc.getDomain();
516
515
 
@@ -519,6 +518,8 @@ class BaseEvernodeClient {
519
518
  (host.lastHeartbeatIndex > 0));
520
519
  return host;
521
520
  }));
521
+
522
+ return (hosts.nextPageToken ? {...hosts, data: res} : res);
522
523
  }
523
524
 
524
525
  /**