fix: Correct sign-check wording in lending protocol messages (#7913)

This commit is contained in:
Timur Yalymov
2026-08-07 20:41:23 +01:00
committed by GitHub
parent a0e78b286f
commit abf5511d07
3 changed files with 8 additions and 8 deletions

View File

@@ -465,7 +465,7 @@ ValidVault::finalize(
if (afterVault.assetsAvailable < kZero)
{
JLOG(j.fatal()) << "Invariant failed: assets available must be positive";
JLOG(j.fatal()) << "Invariant failed: assets available must not be negative";
result = false;
}
@@ -491,13 +491,13 @@ ValidVault::finalize(
if (afterVault.assetsTotal < kZero)
{
JLOG(j.fatal()) << "Invariant failed: assets outstanding must be positive";
JLOG(j.fatal()) << "Invariant failed: assets outstanding must not be negative";
result = false;
}
if (afterVault.assetsMaximum < kZero)
{
JLOG(j.fatal()) << "Invariant failed: assets maximum must be positive";
JLOG(j.fatal()) << "Invariant failed: assets maximum must not be negative";
result = false;
}

View File

@@ -813,7 +813,7 @@ LoanPay::doApply()
XRPL_ASSERT_PARTS(
vaultBalanceAfter >= beast::kZero && brokerBalanceAfter >= beast::kZero,
"xrpl::LoanPay::doApply",
"positive vault and broker balances");
"non-negative vault and broker balances");
XRPL_ASSERT_PARTS(
vaultBalanceAfter >= vaultBalanceBefore,
"xrpl::LoanPay::doApply",

View File

@@ -3260,9 +3260,9 @@ class Invariants_test : public beast::unit_test::Suite
"set must not change assets available",
"set must not change shares outstanding",
"set must not change vault balance",
"assets available must be positive",
"assets available must not be negative",
"assets available must not be greater than assets outstanding",
"assets outstanding must be positive"},
"assets outstanding must not be negative"},
[&](Account const& a1, Account const& a2, ApplyContext& ac) {
auto const keylet = keylet::vault(a1.id(), ac.view().seq());
auto sleVault = ac.view().peek(keylet);
@@ -3424,7 +3424,7 @@ class Invariants_test : public beast::unit_test::Suite
TxAccount::A2);
doInvariantCheck(
{"assets maximum must be positive"},
{"assets maximum must not be negative"},
[&](Account const& a1, Account const& a2, ApplyContext& ac) {
auto const keylet = keylet::vault(a1.id(), ac.view().seq());
return kAdjust(ac.view(), keylet, kArgs(a2.id(), 0, [&](Adjustments& sample) {
@@ -3612,7 +3612,7 @@ class Invariants_test : public beast::unit_test::Suite
doInvariantCheck(
{
"assets maximum must be positive",
"assets maximum must not be negative",
"create operation must not have updated a vault",
},
[&](Account const& a1, Account const& a2, ApplyContext& ac) {