Skip to content

Commit

Permalink
Only send all of non-fungible tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dexX7 committed May 16, 2022
1 parent a152caa commit 196b854
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/omnicore/tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1458,9 +1458,10 @@ int CMPTransaction::logicMath_SendAll()
return (PKT_ERROR_SEND_ALL -22);
}

if (isPropertyNonFungible(property)) {
PrintToLog("%s(): rejected: property %d is of type non-fungible\n", __func__, property);
return (PKT_ERROR_NFT -21);
if (!IsFeatureActivated(FEATURE_NONFUNGIBLE_ISSUER, block)) {
if (isPropertyNonFungible(property)) {
PrintToLog("%s(): rejected: property %d is of type non-fungible\n", __func__, property);
return (PKT_ERROR_NFT -21);
}

// ------------------------------------------
Expand Down Expand Up @@ -1489,6 +1490,14 @@ int CMPTransaction::logicMath_SendAll()
continue;
}

if (IsFeatureActivated(FEATURE_NONFUNGIBLE_ISSUER, block)) {
// do not transfer non-fungible tokens
if (isPropertyNonFungible(propertyId)) {
PrintToConsole("%s: property %d is non-fungible and will not be included in processing.\n", __func__, propertyId);
continue;
}
}

int64_t moneyAvailable = ptally->getMoney(propertyId, BALANCE);
if (moneyAvailable > 0) {
++numberOfPropertiesSent;
Expand Down

0 comments on commit 196b854

Please sign in to comment.