File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2861,15 +2861,20 @@ fn test_process_mint_to(
28612861 } else if dst_initialised. is_err ( ) {
28622862 assert_eq ! ( result, Err ( ProgramError :: InvalidAccountData ) ) ;
28632863 return result;
2864- } else if !dst_initialised. unwrap ( ) {
2865- assert_eq ! ( result, Err ( ProgramError :: UninitializedAccount ) ) ;
2866- return result;
28672864 } else if dst_init_state. unwrap ( ) == AccountState :: Frozen { // unwrap must succeed due to dst_initialised not being err
2865+ // The validation sequence is different from p-token
2866+ // P-Token:
2867+ // - !dst_initialised.unwrap()
2868+ // - dst_init_state.unwrap() == AccountState::Frozen
2869+ // - get_account(&accounts[1]).is_native()
28682870 assert_eq ! ( result, Err ( ProgramError :: Custom ( 17 ) ) ) ;
28692871 return result;
28702872 } else if get_account ( & accounts[ 1 ] ) . is_native ( ) {
28712873 assert_eq ! ( result, Err ( ProgramError :: Custom ( 10 ) ) ) ;
28722874 return result;
2875+ } else if !dst_initialised. unwrap ( ) {
2876+ assert_eq ! ( result, Err ( ProgramError :: UninitializedAccount ) ) ;
2877+ return result;
28732878 } else if accounts[ 0 ] . key != & get_account ( & accounts[ 1 ] ) . mint ( ) {
28742879 assert_eq ! ( result, Err ( ProgramError :: Custom ( 3 ) ) ) ;
28752880 return result;
You can’t perform that action at this time.
0 commit comments