admins can also register trustless tokens (#477)

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-02-27 16:37:57 +01:00 committed by GitHub
parent e4d46c3c5b
commit 16599dd506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -9,11 +9,11 @@ const FIRST_BANK_NUM: u32 = 0;
#[instruction(token_index: TokenIndex)]
pub struct TokenRegisterTrustless<'info> {
#[account(
has_one = fast_listing_admin,
constraint = group.load()?.admin == admin.key() || group.load()?.fast_listing_admin == admin.key() ,
constraint = group.load()?.is_ix_enabled(IxGate::TokenRegisterTrustless) @ MangoError::IxIsDisabled,
)]
pub group: AccountLoader<'info, Group>,
pub fast_listing_admin: Signer<'info>,
pub admin: Signer<'info>,
pub mint: Account<'info, Mint>,