Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,803 changes: 1,803 additions & 0 deletions clients/rust-legacy/tests/batch.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions clients/rust-legacy/tests/close_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async fn fail_init_after_close_account() {
assert_eq!(
error,
TokenClientError::Client(Box::new(TransportError::TransactionError(
TransactionError::InstructionError(2, InstructionError::InvalidAccountData,)
TransactionError::InstructionError(2, InstructionError::IncorrectProgramId,)
)))
);
let error = token.get_account(destination).await.unwrap_err();
Expand Down Expand Up @@ -160,7 +160,7 @@ async fn fail_init_after_close_mint() {
assert_eq!(
error,
TokenClientError::Client(Box::new(TransportError::TransactionError(
TransactionError::InstructionError(2, InstructionError::InvalidAccountData,)
TransactionError::InstructionError(2, InstructionError::IncorrectProgramId)
)))
);
let error = token.get_account(destination).await.unwrap_err();
Expand Down
2 changes: 1 addition & 1 deletion clients/rust-legacy/tests/transfer_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ async fn fail_unsupported_mint() {
assert_eq!(
error,
TokenClientError::Client(Box::new(TransportError::TransactionError(
TransactionError::InstructionError(0, InstructionError::InvalidAccountData)
TransactionError::InstructionError(0, InstructionError::IncorrectProgramId)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example of the change that I mentioned about the ownership checks. Probably it is ok to return a different error. Alternatively, we could move the owner checks to be the last statement of the processor. We would still get a different error if the account is not owned by the program, but other validation checks will stay the same.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean, but keeping the source code easier to read is more important in my opinion

)))
);
}
Expand Down
Loading
Loading