Fix formatting

This commit is contained in:
Bronek Kozicki
2024-12-18 15:01:52 +00:00
parent 526f715f16
commit b9f1200652
3 changed files with 7 additions and 5 deletions

View File

@@ -1037,7 +1037,8 @@ ValidMPTIssuance::finalize(
return mptIssuancesCreated_ == 0 && mptIssuancesDeleted_ == 1;
}
if (tx.getTxnType() == ttMPTOKEN_AUTHORIZE || tx.getTxnType() == ttVAULT_DEPOSIT)
if (tx.getTxnType() == ttMPTOKEN_AUTHORIZE ||
tx.getTxnType() == ttVAULT_DEPOSIT)
{
bool const submittedByIssuer = tx.isFieldPresent(sfHolder);
@@ -1063,8 +1064,7 @@ ValidMPTIssuance::finalize(
return false;
}
else if (
!submittedByIssuer &&
(tx.getTxnType() != ttVAULT_DEPOSIT) &&
!submittedByIssuer && (tx.getTxnType() != ttVAULT_DEPOSIT) &&
(mptokensCreated_ + mptokensDeleted_ != 1))
{
// if the holder submitted this tx, then a mptoken must be

View File

@@ -102,7 +102,8 @@ VaultDeposit::doApply()
// Compute exchange before transferring any amounts.
auto const shares = assetsToSharesDeposit(view(), vault, assets);
XRPL_ASSERT(shares.asset() != assets.asset(), "do not mix up assets and shares");
XRPL_ASSERT(
shares.asset() != assets.asset(), "do not mix up assets and shares");
vault->at(sfAssetTotal) += assets;
vault->at(sfAssetAvailable) += assets;

View File

@@ -2268,7 +2268,8 @@ assetsToSharesDeposit(
{
assert(assets.asset() == vault->at(sfAsset));
Number assetTotal = *vault->at(sfAssetTotal);
STAmount shares{vault->at(sfMPTokenIssuanceID), static_cast<Number>(assets)};
STAmount shares{
vault->at(sfMPTokenIssuanceID), static_cast<Number>(assets)};
if (assetTotal == 0)
return shares;
Number shareTotal = getShareTotal(view, vault);