Skip to content

Commit 74e8694

Browse files
committed
minor refactors
1 parent aa57a11 commit 74e8694

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/AccountDeleteIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void testAccountDeleteItWithDepositAuth() throws JsonRpcClientErrorException, Js
485485
LedgerResult lastLedgerResult = xrplClient.ledger(LedgerRequestParams.builder()
486486
.ledgerSpecifier(LedgerSpecifier.CURRENT).build());
487487

488-
// create, sign & submit AccountDelete tx
488+
// create, sign & submit AccountDelete tx without senderAccount being pre-authorized.
489489
AccountDelete accountDelete = AccountDelete.builder()
490490
.account(senderAccount.publicKey().deriveAddress())
491491
.fee(XrpCurrencyAmount.builder().value(UnsignedLong.valueOf(2000000)).build())

xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/CredentialIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ public void testAcceptCredentialAfterExpiration()
212212
() -> this.getValidatedTransaction(createTxIntermediateResult.transactionResult().hash(), CredentialCreate.class)
213213
);
214214

215+
// Wait for 5 seconds to let credential expire.
215216
Thread.sleep(5 * 1000);
216217

217218
AccountInfoResult subjectAccountInfo = this.scanForResult(

xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/DepositPreAuthIT.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public void preauthorizeCredentialsAndReceivePayment() throws JsonRpcClientError
263263
assertThat(depositAuthorizedAfterAccepting).isTrue();
264264

265265
/////////////////////////
266-
// Send a Payment from the sender wallet to the receiver wallet
266+
// Send a Payment from the sender wallet to the receiver wallet with credentialIds included.
267267
AccountInfoResult senderAccountInfo = this.scanForResult(
268268
() -> this.getValidatedAccountInfo(senderKeyPair.publicKey().deriveAddress())
269269
);
@@ -303,7 +303,7 @@ public void preauthorizeCredentialsAndReceivePayment() throws JsonRpcClientError
303303
}
304304

305305
@Test
306-
public void unableToReceivePaymentWithWithoutCreds() throws JsonRpcClientErrorException, JsonProcessingException {
306+
public void unableToReceivePaymentWithoutCredentials() throws JsonRpcClientErrorException, JsonProcessingException {
307307
/////////////////////////
308308
// Create random issuer/receiver accounts
309309
KeyPair issuerKeyPair = createRandomAccountEd25519();
@@ -399,7 +399,7 @@ public void unableToReceivePaymentWithWithoutCreds() throws JsonRpcClientErrorEx
399399
assertThat(depositAuthorizedAfterAccepting).isTrue();
400400

401401
/////////////////////////
402-
// Send a Payment from the sender wallet to the receiver wallet
402+
// Send a Payment from the sender wallet to the receiver wallet without credentialIds.
403403
AccountInfoResult senderAccountInfo = this.scanForResult(
404404
() -> this.getValidatedAccountInfo(senderKeyPair.publicKey().deriveAddress())
405405
);
@@ -501,10 +501,8 @@ public void updateDepositPreAuthWithLedgerHash() {
501501
);
502502
}
503503

504-
private void assertEntryEqualsObjectFromAccountObjects(
505-
DepositPreAuth depositPreAuth,
506-
DepositPreAuthObject preAuthObject
507-
) throws JsonRpcClientErrorException {
504+
private void assertEntryEqualsObjectFromAccountObjects(DepositPreAuth depositPreAuth,
505+
DepositPreAuthObject preAuthObject) throws JsonRpcClientErrorException {
508506

509507
LedgerEntryResult<DepositPreAuthObject> preAuthEntry;
510508

xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/EscrowIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ public void createAndFinishTimeBasedEscrowWithPreAuthorizationFailure()
691691
);
692692
List<Hash256> credentialObjectIds = getCredentialObjectIds(issuerKeyPair, senderKeyPair, goodCredentials);
693693

694+
// Not passing all the credentialIds.
694695
EscrowFinish escrowFinish = EscrowFinish.builder()
695696
.account(senderKeyPair.publicKey().deriveAddress())
696697
.fee(feeResult.drops().openLedgerFee())

xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/PaymentChannelIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ void createAndClaimPaymentChannelWithPreAuthorization() throws JsonRpcClientErro
363363
);
364364

365365
//////////////////////////
366-
// Source account submits the signed claim to the ledger to get their XRP
366+
// Source account submits the signed claim to the ledger.
367367
PaymentChannelClaim paymentChannelClaim = PaymentChannelClaim.builder()
368368
.account(sourceKeyPair.publicKey().deriveAddress())
369369
.fee(FeeUtils.computeNetworkFees(feeResult).recommendedFee())
@@ -501,7 +501,7 @@ void createAndClaimPaymentChannelWithPreAuthorizationFailure()
501501
assertThat(channelVerifyResult.signatureVerified()).isTrue();
502502

503503
//////////////////////////
504-
// Source account submits the signed claim to the ledger to get their XRP
504+
// Source account submits the signed claim without credentialIds.
505505
PaymentChannelClaim paymentChannelClaim = PaymentChannelClaim.builder()
506506
.account(sourceKeyPair.publicKey().deriveAddress())
507507
.fee(FeeUtils.computeNetworkFees(feeResult).recommendedFee())

0 commit comments

Comments
 (0)