Removes pre-condition for mint, adds conditionals for events #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am curious to hear thoughts on this proposal. It seems to me that nobody really cares about events coming from fungible token contracts that don't include the address of the account that owns them, so I though that it might help to just not emit them if the owner field isn't set. I also figured that if the amount of tokens being withdrawn or deposited is zero, we could also skip emitting the event.
My thoughts are that if the vault isn't stored in storage anywhere, then the event is kind of meaningless, so it saves space and execution time to just not emit it, such as when we are paying rewards or moving tokens in the staking contract. We have equivalent events defined in the staking contract that are much more useful than any deposit or withdrawal events because they include the node ID or delegator ID.
If it wasn't already clear, I would want to apply these changes to the FlowToken contract also
(I also modified a few dependencies to get CI to pass, but those aren't related)