Skip to content

Conversation

@kaynarov
Copy link

@kaynarov kaynarov commented Mar 5, 2020

No description provided.

@kaynarov kaynarov added this to the Sprint-feb-24 milestone Mar 5, 2020
@kaynarov kaynarov self-assigned this Mar 5, 2020
kaynarov added 2 commits March 6, 2020 21:13
it is needed when handling notifications in other contacts
auto box_itr = boxes_idx.find({contract, title});
eosio::check(box_itr != boxes_idx.end(), "box does not exist");
require_auth(box_itr->owner);
if (!box_itr->empty && release) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think contract should prohibit unpack empty box.

boxes_idx.erase(box_itr);
}

void box::unpack(name contract, name treasurer, name title) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unpack and burn can take owner as argument. In this case unpack can send notification to contract instead call contract's release action. These modification enable to use release` action to self-purposes for contract.

zxcat
zxcat previously approved these changes Mar 13, 2020
zxcat
zxcat previously approved these changes Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants