mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix: Assorted Vault fixes (#6607)
This commit is contained in:
committed by
Ed Hennis
parent
baa78ad13a
commit
26d4161239
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user