From 044697c43854e62ad6b44583655dc9e0d33ebcf6 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Wed, 27 Aug 2025 15:24:58 -0400 Subject: [PATCH] fix: Allow the borrower to delete a completed / inactive loan, too. --- src/xrpld/app/tx/detail/LoanDelete.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xrpld/app/tx/detail/LoanDelete.cpp b/src/xrpld/app/tx/detail/LoanDelete.cpp index 4cf9e9a929..e2ee709563 100644 --- a/src/xrpld/app/tx/detail/LoanDelete.cpp +++ b/src/xrpld/app/tx/detail/LoanDelete.cpp @@ -86,10 +86,11 @@ LoanDelete::preclaim(PreclaimContext const& ctx) // should be impossible return tecINTERNAL; // LCOV_EXCL_LINE } - if (loanBrokerSle->at(sfOwner) != account) + if (loanBrokerSle->at(sfOwner) != account && + loanSle->at(sfBorrower) != account) { JLOG(ctx.j.warn()) - << "LoanBroker for Loan does not belong to the account."; + << "Account is not Loan Broker Owner or Loan Borrower."; return tecNO_PERMISSION; }