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

Feature Request - Add .update_inner() to Account<'info, T> to update data with one line #1115

Closed
milk-duds-pro opened this issue Dec 8, 2021 · 0 comments · Fixed by #1177
Labels

Comments

@milk-duds-pro
Copy link
Contributor

Example:

pub fn new_user(ctx: Context<CreateUser>, new_user:User) -> ProgramResult {
    ctx.accounts.user_to_create.update_inner(new_user);
}

very useful for structs that have a ton of fields, that way you dont have to write 20 update lines for each field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants