Skip to content

Commit

Permalink
Support changing issuer of NFTs
Browse files Browse the repository at this point in the history
  • Loading branch information
dexX7 committed Aug 24, 2022
1 parent 29ebd2d commit dc4251c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/omnicore/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ inline std::string error_str(int ec) {
ec_str = "Sender has insufficient balance of property";
break;
case PKT_ERROR_NFT -33:
ec_str = "Sender %s does not own the range being sent";
ec_str = "Sender does not own the range being sent";
break;

default:
Expand Down
9 changes: 6 additions & 3 deletions src/omnicore/tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,7 @@ int CMPTransaction::logicMath_RevokeTokens(CBlockIndex* pindex)
return (PKT_ERROR_TOKENS -22);
}


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 @@ -2546,9 +2547,11 @@ int CMPTransaction::logicMath_ChangeIssuer(CBlockIndex* pindex)
return (PKT_ERROR_TOKENS -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);
}
}

if (!IsPropertyIdValid(property)) {
Expand Down

0 comments on commit dc4251c

Please sign in to comment.