Skip to content

Commit f9a2014

Browse files
authored
checkout to previous mint_to spec (#133)
1 parent ff7b5f7 commit f9a2014

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

program/src/entrypoint-runtime-verification.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,20 +2861,15 @@ 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;
28642867
} 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()
28702868
assert_eq!(result, Err(ProgramError::Custom(17)));
28712869
return result;
28722870
} else if get_account(&accounts[1]).is_native() {
28732871
assert_eq!(result, Err(ProgramError::Custom(10)));
28742872
return result;
2875-
} else if !dst_initialised.unwrap() {
2876-
assert_eq!(result, Err(ProgramError::UninitializedAccount));
2877-
return result;
28782873
} else if accounts[0].key != &get_account(&accounts[1]).mint() {
28792874
assert_eq!(result, Err(ProgramError::Custom(3)));
28802875
return result;

0 commit comments

Comments
 (0)