Skip to content

Conversation

@quantumagi
Copy link
Contributor

No description provided.

// When the tokens are burnt we need to know where to credit the equivalent value on the Stratis chain.
// Currently it is only possible to assign a single address here, so if multiple recipients are required
// the burner will have to wait until each burn is processed before proceeding with the next.
withdrawalAddresses[msg.sender] = address;
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add additional method with onlyOwner modifier that removes value withdrawalAddresses[address].
And in burn method if address is set- revert.
That will prevent users sending requests with multiple recepients in a row before prev requests are processed and subsequently loosing money

Copy link
Contributor Author

@quantumagi quantumagi Nov 18, 2022

Choose a reason for hiding this comment

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

@noescape00 , I've made the following change:

        string memory key = string(abi.encodePacked(msg.sender, " ", burnId));
        withdrawalAddresses[key] = tokenAddress;

Trying to clean-up the dictionary may not be worth the additional costs for each multisig node.

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.

3 participants