fix: Assorted Vault fixes (#6607)

This commit is contained in:
Mayukha Vadari
2026-03-24 11:53:49 -07:00
committed by Ed Hennis
parent baa78ad13a
commit 26d4161239
2 changed files with 5 additions and 8 deletions

View File

@@ -1445,8 +1445,8 @@ doWithdraw(
j) < amount)
{
// LCOV_EXCL_START
JLOG(j.error()) << "LoanBrokerCoverWithdraw: negative balance of "
"broker cover assets.";
JLOG(j.error())
<< "doWithdraw: negative balance of broker cover assets.";
return tefINTERNAL;
// LCOV_EXCL_STOP
}
@@ -3684,7 +3684,7 @@ sharesToAssetsWithdraw(
{
XRPL_ASSERT(
!shares.negative(),
"ripple::sharesToAssetsDeposit : non-negative shares");
"ripple::sharesToAssetsWithdraw : non-negative shares");
XRPL_ASSERT(
shares.asset() == vault->at(sfShareMPTID),
"ripple::sharesToAssetsWithdraw : shares and vault match");

View File

@@ -73,8 +73,7 @@ VaultDelete::preclaim(PreclaimContext const& ctx)
if (!sleMPT)
{
// LCOV_EXCL_START
JLOG(ctx.j.error())
<< "VaultDeposit: missing issuance of vault shares.";
JLOG(ctx.j.error()) << "VaultDelete: missing issuance of vault shares.";
return tecOBJECT_NOT_FOUND;
// LCOV_EXCL_STOP
}
@@ -82,7 +81,7 @@ VaultDelete::preclaim(PreclaimContext const& ctx)
if (sleMPT->at(sfIssuer) != vault->getAccountID(sfAccount))
{
// LCOV_EXCL_START
JLOG(ctx.j.error()) << "VaultDeposit: invalid owner of vault shares.";
JLOG(ctx.j.error()) << "VaultDelete: invalid owner of vault shares.";
return tecNO_PERMISSION;
// LCOV_EXCL_STOP
}
@@ -226,8 +225,6 @@ VaultDelete::doApply()
// Destroy the vault.
view().erase(vault);
associateAsset(*vault, asset);
return tesSUCCESS;
}