evernode-js-client 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +14 -4
- 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
|
-
|
12481
|
-
|
12482
|
-
|
12483
|
-
|
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,
|