pub fn has_signed(&self, owner: &AccountInfo, signer: &AccountInfo) -> bool {
        match self {
            Authority::Basic(key) => {
                *key == *owner.key && *owner.key == *signer.key && signer.is_signer
            }
            Authority::NFT(mint) => {
                let account = Account::unpack(&owner.data.borrow()).unwrap(); // @todo better than unwrap?
                account.mint == *mint
                    && account.amount == 1
                    && account.owner == *signer.key
                    && signer.is_signer
            }
        }
    }
/// Verifies that the owner and signer accounts provided a valid signature for the authority type.
/// For a basic authority, the owner and signer are the same account.
/// For an NFT authority, the owner is the associated SPL token accont, the signer is the associated account's owner
Verifies that the owner and signer accounts provided a valid signature for the authority type.
For a basic authority, the owner and signer are the same account.
For an NFT authority, the owner is the associated SPL token accont, the signer is the associated account's owner
Verifies that the owner and signer accounts provided a valid signature for the authority type . For a basic authority the owner and signer are the same account . For an NFT authority the owner is the associated SPL token accont the signer is the associated account ' s owner
pub fn has_signed(&self, owner: &AccountInfo, signer: &AccountInfo) -> bool {
        match self {
            Authority::Basic(key) => {
                *key == *owner.key && *owner.key == *signer.key && signer.is_signer
            }
            Authority::NFT(mint) => {
                let account = Account::unpack(&owner.data.borrow()).unwrap(); // @todo better than unwrap?
                account.mint == *mint
                    && account.amount == 1
                    && account.owner == *signer.key
                    && signer.is_signer
            }
        }
    }
pub fn has_signed ( & self , owner : & AccountInfo , signer : & AccountInfo ) -> bool { match self { Authority :: Basic ( key ) => { * key == * owner . key && * owner . key == * signer . key && signer . is_signer } Authority :: NFT ( mint ) => { let account = Account :: unpack ( & owner . data . borrow ( ) ) . unwrap ( ) ; // @todo better than unwrap? account . mint == * mint && account . amount == 1 && account . owner == * signer . key && signer . is_signer } } }
Verifies that the owner and signer accounts provided a valid signature for the authority type.
Verifies that the owner and signer accounts provided a valid signature for the authority type .
&self
owner
&AccountInfo
signer
&AccountInfo
&self
owner
&AccountInfo
signer
&AccountInfo