Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsign Tx and Delete PendingTx after Completion #30

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

JavierMNieto
Copy link
Contributor

@JavierMNieto JavierMNieto commented Mar 4, 2022

closes #8 and unsign will delete pending transactions once there are 0 signers which should close #9 & #21.

I had an issue though when deleting pending tx structs from the pending mapping. Turns out mappings cannot be easily deleted from structs. From Solidity Docs on delete operator:

delete has no effect on mappings (as the keys of mappings may be arbitrary and are generally unknown). So if you delete a struct, it will reset all members that are not mappings and also recurse into the members unless they are mappings.

Not really worth fixing for this project, but it's good to know for the future.

The only time this would be an issue is if someone were to complete a pending tx and then create the very same pending tx (with the same hash), then all the previous signers would get an error if they were to sign it again since the previous signers mapping was not cleared.

@JavierMNieto JavierMNieto self-assigned this Mar 4, 2022
@JavierMNieto JavierMNieto linked an issue Mar 4, 2022 that may be closed by this pull request
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.

🏁 Disable confirmed transaction 🟠 Implement removeTx 🟠 Implement unsignTx
2 participants