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

[MTG-294] reusing the existing code for the finalize tree with collection #10

Conversation

StanChe
Copy link
Collaborator

@StanChe StanChe commented Jul 11, 2024

Reusing the existing code combining the validation from the mint to collection and finalize tree with root logic

@StanChe StanChe changed the title reusing the existing code for the finalize tree with collection [MTG-294]reusing the existing code for the finalize tree with collection Jul 11, 2024
Copy link

linear bot commented Jul 11, 2024

@StanChe StanChe changed the title [MTG-294]reusing the existing code for the finalize tree with collection [MTG-294] reusing the existing code for the finalize tree with collection Jul 11, 2024

finalize_tree(
let mut accs: FinalizeTreeWithRoot<'info> = FinalizeTreeWithRoot {
tree_authority: ctx.accounts.tree_authority.to_owned(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Those .to_owned just copy/clone underlying data each time. It might be fine, though it might be not optimal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How should we better do this?

@StanChe StanChe requested a review from RequescoS July 11, 2024 13:00
@RequescoS
Copy link
Collaborator

Great work, thank you!

@StanChe StanChe merged commit 463851b into feature/finalize-tree-with-collection Jul 16, 2024
6 of 7 checks passed
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.

5 participants