From 16599dd50689e4fd8026c297ecdf70e251f12bcb Mon Sep 17 00:00:00 2001 From: microwavedcola1 <89031858+microwavedcola1@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:37:57 +0100 Subject: [PATCH] admins can also register trustless tokens (#477) Signed-off-by: microwavedcola1 --- programs/mango-v4/src/accounts_ix/token_register_trustless.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/mango-v4/src/accounts_ix/token_register_trustless.rs b/programs/mango-v4/src/accounts_ix/token_register_trustless.rs index 7c0eec7e7..ac9ec7cea 100644 --- a/programs/mango-v4/src/accounts_ix/token_register_trustless.rs +++ b/programs/mango-v4/src/accounts_ix/token_register_trustless.rs @@ -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>,