mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
fix uri token flags
This commit is contained in:
committed by
Richard Holland
parent
9effcc3924
commit
8df65be522
@@ -40,13 +40,14 @@ namespace ripple {
|
||||
|
||||
inline URIOperation inferOperation(STTx const& tx)
|
||||
{
|
||||
uint32_t const flags = tx.getFlags();
|
||||
bool const hasDigest = tx.isFieldPresent(sfDigest);
|
||||
bool const hasURI = tx.isFieldPresent(sfURI);
|
||||
bool const hasBurnFlag = flags == tfBurn;
|
||||
bool const hasID = tx.isFieldPresent(sfURITokenID);
|
||||
bool const hasAmt = tx.isFieldPresent(sfAmount);
|
||||
bool const hasDst = tx.isFieldPresent(sfDestination);
|
||||
|
||||
uint32_t const flags = tx.getFlags();
|
||||
bool const hasBurnFlag = flags == tfBurn;
|
||||
bool const hasSellFlag = flags == tfSell;
|
||||
bool const hasBurnableFlag = flags == tfBurnable;
|
||||
bool const blankFlags = flags == 0;
|
||||
@@ -69,7 +70,7 @@ inline URIOperation inferOperation(STTx const& tx)
|
||||
case 0b010000001U:
|
||||
case 0b010000010U:
|
||||
return URIOperation::Mint;
|
||||
case 0b011100001U:
|
||||
case 0b001100000U:
|
||||
return URIOperation::Burn;
|
||||
case 0b000110001U:
|
||||
return URIOperation::Buy;
|
||||
@@ -269,8 +270,9 @@ URIToken::preclaim(PreclaimContext const& ctx)
|
||||
if (acc != *owner)
|
||||
return tecNO_PERMISSION;
|
||||
|
||||
if (!isXRP(*saleAmount))
|
||||
if (!saleAmount->native())
|
||||
{
|
||||
std::cout << "NOT isXRP: " << "\n";
|
||||
AccountID const iouIssuer = saleAmount->getIssuer();
|
||||
if (!ctx.view.exists(keylet::account(iouIssuer)))
|
||||
return tecNO_ISSUER;
|
||||
@@ -739,7 +741,6 @@ URIToken::doApply()
|
||||
sleU->setFieldAmount(sfAmount, ctx_.tx[sfAmount]);
|
||||
|
||||
view().update(sleU);
|
||||
std::cout << "sleU on sell: " << (*sleU) << "\n";
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user