-
Notifications
You must be signed in to change notification settings - Fork 66
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
Handle *_DELEGATE
Transaction Service events
#2106
Conversation
This has now been resolved. |
>, | ||
): Array<Promise<void>> { | ||
if (!event.safeAddress) { | ||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on the case the event is not directly related to a Safe address? I'm not super sure of the this, but does this happen if the delegate is linked to a delegator, but not to a specific Safe? Is it therefore is linked to all the Safes the delegator owns? Maybe we should include a comment explaining the case, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure why or how this can happening but the event can potentially have no address
according to the Transaction Service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to comment. Right now, it is possible to create a delegate for a delegator without a specific safe. In that case, the delegate user would be valid for all safes of the delegator user. If a specific safe is specified, it would only be valid for operations on that safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks guys! Then if I understood correctly, if the Safe address
included in the event is null
we would need to clear the cache for all the Safe addresses the delegator owns. Do you think this is correct? @iamacook @falvaradorodriguez? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm merging this one as it is, and I'm opening a new ticket so we can handle that case separately: #2146
Summary
The Transaction Service now emits new
*_DELEGATE
events for creating, updating and deleting delegates:NEW_DELEGATE
UPDATED_DELEGATE
DELETED_DELEGATE
This adds the relevant validation and handling of the aforementioned, clearing the delegates cache accordingly.
Changes