-
Notifications
You must be signed in to change notification settings - Fork 0
fix(spl): refactor get_rent function and replace slice_eq with Pubkey eq
#143
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
Conversation
dkcumming
left a comment
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.
Approving, but iirc the process of updating the spl_token specs was automated, so will this change need to be accounted for in p-token or is there some idea for how to preserve it?
| assert_eq!(get_mint(&accounts[0]).mint_authority().unwrap().as_ref(), &instruction_data[1..33]); | ||
| let expected_mint_authority = | ||
| Pubkey::new_from_array(instruction_data[1..33].try_into().unwrap()); | ||
| assert_eq!( | ||
| *get_mint(&accounts[0]).mint_authority().unwrap(), | ||
| expected_mint_authority | ||
| ); |
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.
Maybe this code sequence could be a macro? (which of course introduces more differences to the respective code in p-token...)
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.
Done! I'm using macro for now. And it may make it easier to check the consistency.
…ey eq (#143) This PR makes the following specs passed: - test_process_initialize_mint_freeze - test_process_initialize_mint_no_freeze - test_process_initialize_mint2_freeze - test_process_initialize_mint2_no_freeze
This PR makes the following specs passed: