Skip to content

Commit

Permalink
move receiver account variable lower
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel Gutierrez committed Nov 5, 2024
1 parent 7718162 commit 1b17c55
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ void testAccountDeleteItFailsWith_NoDestination() throws JsonRpcClientErrorExcep

@Test
void testAccountDeleteItFailsWith_HasObligations() throws JsonRpcClientErrorException, JsonProcessingException {
// create two accounts, one will be the destination in the tx
final KeyPair senderAccount = constructRandomAccount();
final KeyPair receiverAccount = constructRandomAccount();
// create sender account
KeyPair senderAccount = constructRandomAccount();

// get account info for the sequence number
AccountInfoResult accountInfo = this.scanForResult(
Expand Down Expand Up @@ -312,7 +311,9 @@ void testAccountDeleteItFailsWith_HasObligations() throws JsonRpcClientErrorExce
LedgerResult lastLedgerResult = xrplClient.ledger(LedgerRequestParams.builder()
.ledgerSpecifier(LedgerSpecifier.CURRENT).build());

// create, sign & submit AccountDelete tx
// create receiver account, then create sign & submit AccountDelete tx
KeyPair receiverAccount = constructRandomAccount();

AccountDelete accountDelete = AccountDelete.builder()
.account(senderAccount.publicKey().deriveAddress())
.fee(XrpCurrencyAmount.builder().value(UnsignedLong.valueOf(2000000)).build())
Expand Down

0 comments on commit 1b17c55

Please sign in to comment.