Skip to content

Commit

Permalink
chore: Removes addperm
Browse files Browse the repository at this point in the history
  • Loading branch information
theblockstalk committed Jan 16, 2024
1 parent 1235a3e commit 73d5b95
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions contracts/demo.tmy/src/demo.tmy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,4 @@ namespace eosio
check(it->balance.amount == 0, "Cannot close because the balance is not zero.");
acnts.erase(it);
}

void token::addperm(const name &per)
{
require_auth(get_self());
permission permissions(get_self(), get_self().value);

auto itr = permissions.find(0);
if (itr == permissions.end())
{
permissions.emplace(get_self(), [&](auto &row)
{ row.permission_name = per; });
}
else
{
permissions.modify(itr, eosio::same_payer, [&](auto &row)
{ row.permission_name = per; });
}
}
} /// namespace eosio

0 comments on commit 73d5b95

Please sign in to comment.