-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lang: Add AccountNotInitialized error and checks for it
- Add `AccountInitialized` trait - For `AccountInfo` implement it directly for prevent clone - Add `ErrorCode::AccountNotInitialized` - Add check for it in `Account::try_from` & `Account::try_from_unchecked` - Add check in `ProgramAccount::try_from` & `ProgramAccount::try_from_unchecked` - Yes this type deprecated, but until it is removed from the repository, it seems to me not superfluous to add this check to it - Add `ErrorCode::StateNotInitialized` - Add check in `State::try_from` - Improve documentation for `AccountInitialized` trait - Add `AccountNotInitialized` & `StateNotInitialized` to error.ts
- Loading branch information
1 parent
94de51b
commit 3596b62
Showing
7 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters