Skip to content

Commit

Permalink
Merge #1256: Only send all of non-fungible tokens
Browse files Browse the repository at this point in the history
Pull request description:

  With this pull request, sending non-fungible tokens is skipped when using send all.
  • Loading branch information
dexX7 committed May 24, 2022
2 parents a152caa + 29c3280 commit 8be1baf
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/omnicore/tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1458,9 +1458,11 @@ 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 +1491,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 8be1baf

Please sign in to comment.