evernode-js-client 0.6.9 → 0.6.10

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 +14 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12477,10 +12477,20 @@ class BaseEvernodeClient {
12477
12477
  let paramData = Buffer.allocUnsafe(20);
12478
12478
  codec.decodeAccountID(hostAddress).copy(paramData);
12479
12479
 
12480
- // To obtain registration NFT Page Keylet and index.
12481
- const hostAcc = new XrplAccount(hostAddress, null, { xrplApi: this.xrplApi });
12482
- const regUriToken = (await hostAcc.getURITokens()).find(n => n.URI.startsWith(EvernodeConstants.TOKEN_PREFIX_HEX) && n.Issuer === this.config.registryAddress);
12483
- if (regUriToken) {
12480
+ const hostInfo = await this.getHostInfo(hostAddress);
12481
+
12482
+ let validPrune = false;
12483
+ // If this host is a transferer, it does not own a registration token
12484
+ if (!hostInfo.isATransferer) {
12485
+ const hostAcc = new XrplAccount(hostAddress, null, { xrplApi: this.xrplApi });
12486
+ const regUriToken = (await hostAcc.getURITokens()).find(n => n.URI.startsWith(EvernodeConstants.TOKEN_PREFIX_HEX) && n.Issuer === this.config.registryAddress);
12487
+ validPrune = !!regUriToken;
12488
+ }
12489
+ else
12490
+ validPrune = true;
12491
+
12492
+
12493
+ if (validPrune) {
12484
12494
  await this.xrplAcc.makePayment(this.config.registryAddress,
12485
12495
  XrplConstants.MIN_XRP_AMOUNT,
12486
12496
  XrplConstants.XRP,
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.6.9",
9
+ "version": "0.6.10",
10
10
  "dependencies": {
11
11
  "elliptic": "6.5.4",
12
12
  "libsodium-wrappers": "0.7.10",