Use UncheckedAccount over AccountInfo

UncheckedAccount is the preferred alias, there should be no behavior
difference.
This commit is contained in:
Christian Kamm 2021-11-30 13:16:09 +01:00
parent 6f85300c4c
commit 39e7cd1fc0
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ pub struct CreateRegistrar<'info> {
/// a voting registrar. There can only be a single registrar
/// per governance realm.
pub registrar: AccountLoader<'info, Registrar>,
pub governance_program_id: AccountInfo<'info>,
pub governance_program_id: UncheckedAccount<'info>,
// Unsafe and untrusted. This instruction needs to be invoked immediately
// after the realm is created.
// TODO can't we ensure that a realm owner can call this instruction?
@ -194,7 +194,7 @@ pub struct Withdraw<'info> {
pub registrar: AccountLoader<'info, Registrar>,
#[account(mut, has_one = registrar, has_one = voter_authority)]
pub voter: AccountLoader<'info, Voter>,
pub token_owner_record: AccountInfo<'info>,
pub token_owner_record: UncheckedAccount<'info>,
#[account(
mut,
associated_token::authority = registrar,