From 98d1cf07edf3020f95e7e5ef8237da776fc6b689 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 16 Oct 2025 16:04:16 -0400 Subject: [PATCH] Compare Numbers against beast::zero --- src/xrpld/app/tx/detail/LoanPay.cpp | 4 ++-- src/xrpld/app/tx/detail/LoanSet.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xrpld/app/tx/detail/LoanPay.cpp b/src/xrpld/app/tx/detail/LoanPay.cpp index a28e07f6d1..0985b194cd 100644 --- a/src/xrpld/app/tx/detail/LoanPay.cpp +++ b/src/xrpld/app/tx/detail/LoanPay.cpp @@ -452,14 +452,14 @@ LoanPay::doApply() view, brokerPayee, asset, fhIGNORE_FREEZE, ahIGNORE_AUTH, j_); #endif - if (totalPaidToVault != Number{}) + if (totalPaidToVault != beast::zero) { if (auto const ter = requireAuth( view, asset, vaultPseudoAccount, AuthType::StrongAuth)) return ter; } - if (totalPaidToBroker != Number{}) + if (totalPaidToBroker != beast::zero) { if (brokerPayee == account_) { diff --git a/src/xrpld/app/tx/detail/LoanSet.cpp b/src/xrpld/app/tx/detail/LoanSet.cpp index 83f3f0a429..5bd544bcf3 100644 --- a/src/xrpld/app/tx/detail/LoanSet.cpp +++ b/src/xrpld/app/tx/detail/LoanSet.cpp @@ -401,7 +401,7 @@ LoanSet::doApply() // avoids dividing by 0. auto const roundedPayment = roundPeriodicPayment( vaultAsset, properties.periodicPayment, properties.loanScale); - if (roundedPayment == Number{}) + if (roundedPayment == beast::zero) { JLOG(j_.warn()) << "Loan Periodic payment (" << properties.periodicPayment << ") rounds to 0. "; @@ -494,7 +494,7 @@ LoanSet::doApply() // 2. Transfer originationFee, if any, from vault pseudo-account to // LoanBroker owner. - if (originationFee != Number{}) + if (originationFee != beast::zero) { // Create the holding if it doesn't already exist (necessary for MPTs). // The owner may have deleted their MPT / line at some point.