Skip to content

Commit

Permalink
only check issue amount max if nft
Browse files Browse the repository at this point in the history
  • Loading branch information
cthacker committed Aug 7, 2019
1 parent 37cb585 commit 382d85e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file modified build/dgoods/dgoods.wasm
Binary file not shown.
3 changes: 2 additions & 1 deletion src/dgoods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ACTION dgoods::issue(name to,

check( is_account( to ), "to account does not exist");
check( memo.size() <= 256, "memo has more than 256 bytes" );
check( quantity.amount <= 100, "can issue 100 at a time");


// dgoodstats table
stats_index stats_table( get_self(), category.value );
Expand All @@ -111,6 +111,7 @@ ACTION dgoods::issue(name to,
check( quantity.amount <= (dgood_stats.max_supply.amount - dgood_stats.current_supply.amount), "Cannot issue more than max supply" );

if (dgood_stats.fungible == false) {
check( quantity.amount <= 100, "can issue 100 at a time");
if ( quantity.amount > 1 ) {
asset issued_supply = dgood_stats.issued_supply;
asset one_token = asset( 1, dgood_stats.max_supply.symbol);
Expand Down

0 comments on commit 382d85e

Please sign in to comment.