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

Refactor SafeOperation #846

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Refactor SafeOperation #846

merged 1 commit into from
Mar 20, 2024

Conversation

Uxio0
Copy link
Member

@Uxio0 Uxio0 commented Mar 20, 2024

  • Make class inmutable
  • Add proper caches
  • Return valid_after and valid_until as datetime

@Uxio0 Uxio0 requested a review from a team as a code owner March 20, 2024 14:16
- Make class inmutable
- Add proper caches
- Return `valid_after` and `valid_until` as datetime
@Uxio0 Uxio0 force-pushed the convert-safe-operation-valid branch from 8bba81e to 9ce4c9a Compare March 20, 2024 15:35
@@ -75,6 +80,63 @@ def from_user_operation(cls, user_operation: UserOperation):
user_operation.signature[12:],
)

@staticmethod
def _parse_epoch(epoch: int) -> Optional[datetime.datetime]:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this would be better in a utils file.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is only for this class, as usually we don't want to ignore the exception

@Uxio0 Uxio0 merged commit 46233d8 into main Mar 20, 2024
7 checks passed
@Uxio0 Uxio0 deleted the convert-safe-operation-valid branch March 20, 2024 15:55
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants