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

Add auto_add_now=True to Wallet.created #25

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

pconerly
Copy link
Collaborator

@pconerly pconerly commented Jun 5, 2022

Use django's built-in auto_now_add option on Wallet.created. This helps makes using Wallet.objects.create a little nicer and keeps the same behavior that was probably intended in the project.

I added this commit ontop of the "minimal tests" branch, so rebasing might be needed if that branch changes before it's merged.

@pconerly pconerly force-pushed the wallet-created-auto-add-now branch from 7f945fd to eb47d15 Compare June 6, 2022 05:27
@pconerly
Copy link
Collaborator Author

pconerly commented Jun 6, 2022

rebased onto main after minimal-tests was merged in

account = Account.create()
wallet = Wallet.objects.create(ethereum_address=account.address)
diff = wallet.created - now
self.assertTrue(diff < datetime.timedelta(seconds=1))
Copy link
Owner

Choose a reason for hiding this comment

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

Created #30 to eventually replace this logic

@payton payton merged commit 62e31bf into payton:main Jun 9, 2022
@pconerly pconerly deleted the wallet-created-auto-add-now branch June 10, 2022 08:52
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.

2 participants