-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: deprecating changing vest ownership #3
Conversation
wei3erHase
commented
Sep 19, 2024
•
edited
Loading
edited
- deprecates the changing of ownership of a vest / lockup (not needed and causes edge-cases)
- also erases related JS codebase to call it
@@ -176,15 +163,12 @@ impl VestingInstruction { | |||
schedules, | |||
} | |||
} | |||
2 | 3 => { | |||
2 => { | |||
let seeds: [u8; 32] = rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seeds
unwrapping process is repeated quite a bit, is this some gas thing, or would we be good abstracting it into a small fn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, i'd prefer to change less than aim for a gas efficient method
2 => Self::Unlock { seeds }, | ||
_ => Self::ChangeDestination { seeds }, | ||
} | ||
Self::Unlock { seeds } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again im not super familiar with either rust nor solana code but the 3 match cases are quite long, do you think it justifies extracting each one of them into a small function and so something like:
match tag {
0 => Self::init,
1 => Self::create,
2 => Self::unlock
_ => any error handling?
}
…rland/token-locking into feat/deprecate-transfer