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

[chore] refactor extractFromCtx a bit #2646

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Conversation

tsmethurst
Copy link
Contributor

A little chore PR that comes out of the Move stuff I've been doing. PRing it separately here to avoid the Move PR becoming too big.

Just refactors extractFromCtx -> getActivityContext and simplifies the return type. No actual logic changes, but there might be in the Move PR.

Copy link
Member

@daenney daenney left a comment

Choose a reason for hiding this comment

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

This looks good to me, it's just moving the data we got returned by the function into a struct.

One thing maybe for the future, if you change the requestingAcct and receivingAcct variables that are created in function bodies to be requestingAccount and receivingAccount to retain the same names as we originally had, the diff becomes a lot smaller making this kind of change a bit simpler to review.

@tsmethurst
Copy link
Contributor Author

Ah yes, I actually did that in a previous version of this, but I ended up preferring the brevity of requestingAcct compared to requestingAccount etc. Bit easier on the eyes and we don't use acct to mean anything else.

@tsmethurst tsmethurst merged commit d3f35e8 into main Feb 17, 2024
3 checks passed
@tsmethurst tsmethurst deleted the chore_extract_ctx_rename branch February 17, 2024 14:20
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