Skip to content

Commit

Permalink
rename vars
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 committed Oct 11, 2024
1 parent 9e8ab5f commit 62eca0d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/xrpld/ledger/detail/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1720,27 +1720,27 @@ requireAuth(
AccountID const& account)
{
auto const mptID = keylet::mptIssuance(mptIssue.getMptID());
auto const issuanceSle = view.read(mptID);
auto const sleIssuance = view.read(mptID);

if (!issuanceSle)
if (!sleIssuance)
return tecOBJECT_NOT_FOUND;

auto const mptIssuer = issuanceSle->getAccountID(sfIssuer);
auto const mptIssuer = sleIssuance->getAccountID(sfIssuer);

// issuer is always "authorized"
if (mptIssuer == account)
return tesSUCCESS;

auto const mptokenID = keylet::mptoken(mptID.key, account);
auto const tokSle = view.read(mptokenID);
auto const sleToken = view.read(mptokenID);

// if account has no MPToken, fail
if (!tokSle)
if (!sleToken)
return tecNO_AUTH;

// mptoken must be authorized if issuance enabled requireAuth
if (issuanceSle->getFieldU32(sfFlags) & lsfMPTRequireAuth &&
!(tokSle->getFlags() & lsfMPTAuthorized))
if (sleIssuance->getFieldU32(sfFlags) & lsfMPTRequireAuth &&
!(sleToken->getFlags() & lsfMPTAuthorized))
return tecNO_AUTH;

return tesSUCCESS;
Expand Down

0 comments on commit 62eca0d

Please sign in to comment.